3
You can create a class in C# and the same class in SQL Server that represents a tabela (ID, Nome, Telefone)
and create a precedent where I would pass as parameter this class .
This is the class example
puclic class Cliente
{
public int ID;
public string Nome, Telefone;
}
At the time of reading the database data I would call the example Process PROC_Select_Cliente
and this precedent returns me an object of the client class.
At the time of the Insert I would call the Procedure PROC_Insert_Cliente
passing as parameter an instance of the client class where there is all the information.
I don’t know if it exists so I don’t have a code to show.
Hello, welcome! Your question is a bit confusing. Is there any code you are already working on? You just want to persist an object in a database and be able to retrieve it to manipulate?
– Leonardo Pessoa
I recommend using the Entity Framework. Search and it is not difficult to use
– Renato Afonso