Posts by user2958184 • 41 points
3 posts
-
1
votes2
answers98
viewsA: EF6: Error while Saving
I usually use the following idea when persisting information in the bank using EF: public void AdicionarOuAtualizar(T entidade) { if (entidade.Id == default(int)) { _contexto.Entry(entidade).State =…
-
2
votes2
answers1303
viewsA: What is the difference between creating a Context with Dbcontext and Datacontext?
The Dbcontext is a newer class and represents a combination of Work Unit and Repository standards and can be used to perform queries in the Database. The Datacontext is an older class and represents…
-
1
votes4
answers275
viewsA: API project with many layers
I agree with Genos, everything will depend on the complexity of your project and your scenario. The ideal is to have as few layers as possible, that is, only the necessary. Separating into layers,…