Ejemplo n.º 1
0
        public static DAL.App.DTO.DomainLikeDTO.Inventory MapFromDomain(Domain.Inventory inventory)
        {
            var res = inventory == null ? null : new DAL.App.DTO.DomainLikeDTO.Inventory
            {
                Id                    = inventory.Id,
                Description           = inventory.Description?.Translate(),
                InventoryCreationTime = inventory.InventoryCreationTime,
                ShopId                = inventory.ShopId,
                Shop                  = ShopMapper.MapFromDomain(inventory.Shop)
            };

            return(res);
        }
Ejemplo n.º 2
0
 public void UpdateStock(Domain.Inventory inv)
 {
     _db.Inventory.Update(Mapper.Map(inv));
 }