public ItemDb(EFGameShopDatabase.Models.Item item) { OrderEntries = new HashSet <OrderEntryDb>(); this.ItemId = item.ItemId; this.AvailableQuantity = item.AvailableQuantity; this.Description = item.Description; this.LoyalPoints = item.LoyalityPoints; this.Name = item.Name; this.Price = item.Price; this.TaxRate = item.TaxRate; this.Type = item.Type; this.Unit = item.Unit; }
public static Item Map(EFGameShopDatabase.Models.Item item) { return(new Item() { ItemId = item.ItemId, AvailableQuantity = item.AvailableQuantity, Description = item.Description, LoyalityPoints = item.LoyalityPoints, Name = item.Name, Price = item.Price, TaxRate = item.TaxRate, Type = item.Type, Unit = item.Unit }); }