Exemple #1
0
 public List <Severity> ReadSeverityList()
 {
     using (var ctx = new musteragContext())
     {
         return(ctx.Severity.ToList());
     }
 }
Exemple #2
0
 public long Count()
 {
     using (var ctx = new musteragContext())
     {
         return(ctx.Location.Count());
     }
 }
Exemple #3
0
 public List <VLogentries> ReadLogList()
 {
     using (var ctx = new musteragContext())
     {
         return(ctx.VLogentries.ToList());
     }
 }
Exemple #4
0
 public List <Location> ReadAllLocationList()
 {
     using (var ctx = new musteragContext())
     {
         return(ctx.Location.ToList());
     }
 }
Exemple #5
0
 public List <LocTree> ReadLocTree()
 {
     using (var ctx = new musteragContext())
     {
         return(ctx.LocTree.OrderBy(lo => lo.Lvl).ToList());
     }
 }
 public List <Pod> ReadPodList()
 {
     using (var ctx = new musteragContext())
     {
         return(ctx.Pod.ToList());
     }
 }
 public List <Models.Customer> ReadCustomerList()
 {
     using (var ctx = new musteragContext())
     {
         return(ctx.Customer.ToList());
     }
 }
 public void DeleteCustomer(Models.Customer customer)
 {
     using (var ctx = new musteragContext())
     {
         ctx.Customer.Remove(ctx.Customer.Single(c => c.IdCustomer == customer.IdCustomer));
         ctx.SaveChanges();
     }
 }
 public void UpdateCustomer(Models.Customer customer)
 {
     using (var ctx = new musteragContext())
     {
         ctx.Customer.Update(customer);
         ctx.SaveChanges();
     }
 }
 public List <Models.Customer> ReadCustomerListBySearchKey(string searchKey)
 {
     searchKey = searchKey.ToLower();
     using (var ctx = new musteragContext()) {
         return(ctx.Customer.Where(c => c.Firstname.ToLower().Contains(searchKey) ||
                                   c.Lastname.ToLower().Contains(searchKey)).ToList());
     }
 }