示例#1
0
 public override void Update(Customer entity)
 {
     using (Context = new SysInventoryEntities())
     {
         var found = Context.Customers.Find(entity.Id);
         if (found == null)
         {
             return;
         }
         found.Mail          = entity.Mail;
         found.Name          = entity.Name;
         found.AddressFk     = entity.Address.Id;
         found.AddressTypeFk = entity.AddressType.Id;
         Context.SaveChanges();
     }
 }
示例#2
0
 public override Address GetSingle <TKey>(TKey pkValue)
 {
     Context = new SysInventoryEntities();
     return(Context.Addresses.Find(pkValue));
 }
示例#3
0
 public override IQueryable <Address> GetAll()
 {
     Context = new SysInventoryEntities();
     return(Context.Addresses.Include("City"));
 }
示例#4
0
 public override IQueryable <Customer> GetAll(Expression <Func <Customer, bool> > whereExpression)
 {
     Context = new SysInventoryEntities();
     return(Context.Customers.Include("Address").Where(whereExpression));
 }
 public override IQueryable <AddressType> GetAll()
 {
     Context = new SysInventoryEntities();
     return(Context.AddressTypes);
 }
示例#6
0
 public override IQueryable <Customer> GetAll()
 {
     Context = new SysInventoryEntities();
     return(Context.Customers.Include("Address"));
 }
示例#7
0
 public override ILogEntry GetSingle <TKey>(TKey pkValue)
 {
     using (Context = new SysInventoryEntities())
         return(Context.v_logentries.Find(pkValue));
 }
示例#8
0
 public override void Update(ILogEntry entity)
 {
     using (Context = new SysInventoryEntities())
         Context.LogClear(entity.Id);
 }
示例#9
0
 public override IQueryable <ILogEntry> GetAll(Expression <Func <ILogEntry, bool> > whereExpression)
 {
     Context = new SysInventoryEntities();
     return(whereExpression != null?Context.v_logentries.Where(whereExpression) : Context.v_logentries);
 }
示例#10
0
 public override IQueryable <ILogEntry> GetAll()
 {
     Context = new SysInventoryEntities();
     return(Context.v_logentries);
 }
 public override IQueryable <WindowFunction> GetAll()
 {
     Context = new SysInventoryEntities();
     return(Context.WindowFunctions);
 }
示例#12
0
 public override ILocation GetSingle <TKey>(TKey pkValue)
 {
     using (Context = new SysInventoryEntities())
         return(Context.LocationEfs.Find(pkValue));
 }
示例#13
0
 public override IQueryable <ILocation> GetAll()
 {
     Context = new SysInventoryEntities();
     return(Context.LocationEfs.OrderBy(x => x.Name));
 }