/// <summary> /// By default queries the table matching the class name. /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> public IEnumerable <T> GetList <T>() { SetSimpleCRUD(); using (var conn = new SqlConnection(_connectionString)) { conn.Open(); IEnumerable <T> ret = _simpleCRUD.GetList <T>(conn); conn.Close(); return(ret); } }
public List <PetOwner> GetList() { List <PetOwner> result = GetCache().ToList(); if (!result.Any()) { var persons = SimpleCRUD.GetList <Person>(_connection); if (persons != null && persons.Any()) { foreach (var person in persons) { var pets = GetPetsForOwner(person.Id); var model = ToModel(person, pets); result.Add(model); UpdateCache(model, model.Id.ToString()); } } } return(result); }
public virtual IEnumerable <TModel> GetList(object whereConditions, IDbTransaction transaction = null, int?commandTimeout = null) { return(SimpleCRUD.GetList <TModel>(_connection, whereConditions, transaction, commandTimeout)); }
public IEnumerable <Genre> GetList() { return(SimpleCRUD.GetList <Genre>(Connection)); }
public virtual IEnumerable <TModel> GetList(string conditions, object parameters = null, IDbTransaction transaction = null, int?commandTimeout = null) { return(SimpleCRUD.GetList <TModel>(_connection, conditions, parameters, transaction, commandTimeout)); }