public Customer GetById(int id) { using (var db = new WebContextDb()) { return(db.Customer.FirstOrDefault(p => p.Id == id)); } }
public List <T> GetList() { using (var db = new WebContextDb()) { return(db.Set <T>().ToList()); } }
public Customer GetCompletePersonById(int id) { using (var db = new WebContextDb()) { return(db.Customer .Include(p => p.Id) .FirstOrDefault(p => p.Id == id)); } }
public List <Customer> GetListBySize(int size) { using (var db = new WebContextDb()) { return(db.Customer .OrderByDescending(p => p.Order) .Take(size).ToList()); } }
public BaseRepositorio(WebContextDb @object) { this.@object = @object; }
public BaseRepositorio() { db = new Repositorio.WebContextDb(); }