コード例 #1
0
 public static Warehouse ToEntity(this UpdatedWarehouse updatedWarehouse)
 {
     return(new Warehouse()
     {
         Id = updatedWarehouse.Id
         , Name = updatedWarehouse.Name
         , Description = updatedWarehouse.Description
         , CreationDate = updatedWarehouse.CreateDate
     });
 }
コード例 #2
0
 public RegisteredWarehouse Update(UpdatedWarehouse updateRegistry)
 {
     using (LogisticDataContext logisticDataContext = new LogisticDataContext())
     {
         var wareHouseEntity = updateRegistry.ToEntity();
         logisticDataContext.Warehouses.Attach(wareHouseEntity);
         logisticDataContext.Entry(wareHouseEntity).State = System.Data.Entity.EntityState.Modified;
         logisticDataContext.SaveChanges();
         return(wareHouseEntity.toDTO());
     }
 }
コード例 #3
0
 public RegisteredWarehouse Update(UpdatedWarehouse updatedWarehouse)
 {
     updatedWarehouse.CreateDate = DateTime.Now;
     return(this._warehouseService.Update(updatedWarehouse));
 }