internal static DbOrderProduct ToDbOrderProduct(KeyValuePair <int, int> pair) { var product = ProductDbSetInterfacer.ToDbProduct( StoreManagerApplication.Get <Product>(pair.Key) ); return(new DbOrderProduct { Product = product, Count = pair.Value }); }
internal static DbStoreInventory ToDbStoreInventory(KeyValuePair <int, Tuple <int, int?> > pair) { var product = ProductDbSetInterfacer.ToDbProduct( StoreManagerApplication.Get <Product>(pair.Key) ); return(new DbStoreInventory { Product = product, Count = pair.Value.Item1, Threshold = pair.Value.Item2 }); }