public Order Get(long id) { var Order = _DressBookingDBContext.Orders.SingleOrDefault(b => b.Id == id); if (Order == null) { return(null); } _DressBookingDBContext.Entry(Order).Reference(b => b.Dress).Load(); return(Order); }
public Dress GetCopy(long id) { Dress d = Get(id); return((Dress)_DressBookingDBContext.Entry(d).CurrentValues.ToObject()); }