示例#1
0
 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;
 }
示例#2
0
 public void Update(DalLot dallot)
 {
     Maper.ToOrmLot(dallot, context.Set<OrmLot>().FirstOrDefault(dblot => dblot.Id == dallot.Id));
 }
示例#3
0
 public void Create(DalLot dallot)
 {
     context.Set<OrmLot>().Add(dallot.ToOrmLot());
 }
示例#4
0
 public void Delete(DalLot dallot)
 {
     throw new NotImplementedException();
 }
示例#5
0
 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;
 }