Advertisement
Guest User

Untitled

a guest
Aug 14th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public class DataPetapoco
  2. {
  3. public Database Db()
  4. {
  5. string serverName = ".\SQLEXPRESS;";
  6. string dbName = "db";
  7. string username = "user";
  8. string password = "123";
  9.  
  10. var connectionstring = "Data Source=" + serverName +
  11. ";Initial Catalog=" + dbName +
  12. ";User ID=" + username +
  13. ";Password=" + password +
  14. ";Max Pool Size=200;Pooling=true" +
  15. ";Connect Timeout=20";
  16.  
  17. return new Database(connectionstring , "System.Data.SqlClient");
  18. }
  19. }
  20.  
  21. var res = DataPetapoco.Db().Fetch<ProductViewModel>("select * from table");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement