user2219485
user2219485

Reputation: 41

petapoco shared connection

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

Upvotes: 3

Views: 2052

Answers (1)

Schotime
Schotime

Reputation: 15997

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

Upvotes: 3

Related Questions