public Users GetUser(string user, string password, out string messageCode, out string message) { messageCode = string.Empty; message = string.Empty; List <Users> uLst = ConversionHelpers.ConvertToList <Users>(new UserDAL().GetUser(user, password, out messageCode, out message)); if (uLst.Count > 0) { return(uLst[0]); } return(null); }
public void Func1() { DataTable dt = new DataTable(); dt.Columns.Add("Id"); dt.Columns.Add("Name"); DataRow drdt = dt.NewRow(); drdt[0] = 1; drdt[1] = "Sam"; dt.Rows.Add(drdt); DataSet ds = new DataSet(); ds.Tables.Add(dt); IDataReader rdr = null; rdr = ds.CreateDataReader(); List <Model1> x = new List <Model1>(); x = ConversionHelpers.ConvertToList <Model1>(rdr); }