public IQueryable <Customer> GetByStatus(ProfileQueryType Type = Models.Profiles.Enums.ProfileQueryType.All) { switch (Type) { case Models.Profiles.Enums.ProfileQueryType.Active: return(erpNodeDBContext.Customers.Where(c => c.Status == CustomerStatus.Active)); case ERPCore.Enterprise.Models.Profiles.Enums.ProfileQueryType.InActive: return(erpNodeDBContext.Customers.Where(c => c.Status == CustomerStatus.InActive)); case ERPCore.Enterprise.Models.Profiles.Enums.ProfileQueryType.All: default: return(erpNodeDBContext.Customers); } }
public IQueryable <Models.Suppliers.Supplier> GetByType(ProfileQueryType Type = ProfileQueryType.Active) { switch (Type) { case ProfileQueryType.Active: return(erpNodeDBContext.Suppliers .Where(s => s.Status == SupplierStatus.Active)); case ProfileQueryType.InActive: return(erpNodeDBContext.Suppliers .Where(s => s.Status == Models.Suppliers.Enums.SupplierStatus.InActive)); case ProfileQueryType.All: default: return(erpNodeDBContext.Suppliers); } }