Пример #1
0
        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);
        }
Пример #2
0
        public Dress GetCopy(long id)
        {
            Dress d = Get(id);

            return((Dress)_DressBookingDBContext.Entry(d).CurrentValues.ToObject());
        }