Pregunta

I am new to .net and this is my first project using c# winforms. for DAL i choose the petapoco.

i go through the sample code of petapoco and i have some basic question where i get confused

my project is multiuser desktop application and performance is priority.

1) shall i use the OpenSharedConnection or not.

2) can we use sharedconnection to do insert / update. plese go through the following answer where sharedconnection use only for select Correct way to use PetaPoco in DAL layer (ASP.NET Web Forms VB.NET) in some example i observed that sharedconnection used for only select and for crud they use

var db = new Database("connectionstring");

which is the right method.

Thanks in advance

¿Fue útil?

Solución

You do not have to call OpenSharedConnection() explicitly. It will be called for you when you execute your query.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top