internal static BllLot ToBllLot(DalLot dallot) { if (dallot != null) return new BllLot() { UserId = dallot.UserId, TimeBegin = dallot.TimeBegin, StatysId = dallot.StatysId, StartPrice = dallot.StartPrice, Name = dallot.Name, Id = dallot.Id, EndPrice = dallot.EndPrice, Description = dallot.Description, DateBegin = dallot.DateBegin, CathegoryId = dallot.CathegoryId, BuyerName = dallot.BuyerName }; return null; }
public void Update(DalLot dallot) { Maper.ToOrmLot(dallot, context.Set<OrmLot>().FirstOrDefault(dblot => dblot.Id == dallot.Id)); }
public void Create(DalLot dallot) { context.Set<OrmLot>().Add(dallot.ToOrmLot()); }
public void Delete(DalLot dallot) { throw new NotImplementedException(); }
internal static void ToOrmLot(DalLot dallot, OrmLot ormlot) { ormlot.OrmUserId = dallot.UserId; ormlot.TimeBegin = dallot.TimeBegin; ormlot.OrmStatysId = dallot.StatysId; ormlot.StartPrice = dallot.StartPrice; ormlot.Name = dallot.Name; ormlot.Id = dallot.Id; ormlot.EndPrice = dallot.EndPrice; ormlot.Description = dallot.Description; ormlot.DateBegin = dallot.DateBegin; ormlot.OrmCathegoryId = dallot.CathegoryId; ormlot.BuyerName = dallot.BuyerName; }