Esempio n. 1
0
 public List <User> Get()
 {
     //List<SqlParameter> parms = new List<SqlParameter>();
     //parms.Add(new SqlParameter("@Name", "y"));
     //SqlParameter pCount = new SqlParameter();
     //pCount.ParameterName = "@UserCount";
     //pCount.DbType = DbType.Int32;
     //pCount.Direction = ParameterDirection.Output;
     //parms.Add(pCount);
     //Dbcon.Get("spGetUserCount", typeof(int), CommandType.StoredProcedure, parms);
     //var val = pCount.Value;
     //get value from proc
     //var b  = dbCon.Get("select Count(Id) from User_Table", System.Data.CommandType.Text, null, typeof(int)).Cast<int>().ToArray();
     return(dbCon.Get("select * from User_Table", System.Data.CommandType.Text, null, typeof(User)).Cast <User>().ToList());
 }