public static Store MapStore(Entities.Store store) { string a = store.Location; int c = store.Id; Store k = new Store(a, c); foreach (Entities.Inventory i in store.Inventory) { var merch = MapMerch(i.Merch); k.AddNewItem(merch, i.Stock); } return(k); }
public static Store MapStore(Entities.Store store) { Address a; a = new Address(store.Street, store.City, store.State, store.Zip); int c = store.Id; Store k = new Store(a, c); foreach (Entities.Inventory i in store.Inventory) { var merch = MapMerch(i.NameNavigation); k.AddNewItem(merch, i.Amount); } return(k); }