Link to home
Start Free TrialLog in
Avatar of Brant Snow
Brant Snow

asked on

c# external sql server queries

We have a C# application, for some reasons i wont go into we are unable to use Entity Framework.

That being said I still prefer to have parameterized sql statements external from my application code, especially the large ones.  For most small CRUD based options I have just written a simple class to map the objects etc.  

What would be the best way to externalize the sql queries but still allow some dynamic parameters, Ill provide a simple example here

StringBuilder x = new StringBuilder();
x.AppendFormat("select * from Customers where CustomerId = {0}", this.CustomerId);
ASKER CERTIFIED SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial