Пример #1
0
 public void Update(W***e entity)
 {
     FirstName    = entity.FirstName;
     LastName     = entity.LastName;
     Age          = entity.Age;
     PimpId       = entity.Pimp?.Id ?? entity.PimpId;
     PricePerHour = entity.PricePerHour;
 }
Пример #2
0
 public void ChangeWhore(W***e w***e)
 {
     using (var ctxt = GetContext())
     {
         var oldItem = ctxt.W****s.FirstOrDefault(x => x.Id == w***e.Id);
         oldItem?.Update(w***e);
         ctxt.SaveChanges();
     }
 }
Пример #3
0
 public void AddWhore(W***e w***e)
 {
     using (var ctxt = GetContext())
     {
         if (w***e.Pimp != null)
         {
             w***e.PimpId = w***e.Pimp.Id;
         }
         w***e.Pimp = null; //TODO: create best resolve of this problem
         ctxt.W****s.Add(w***e);
         ctxt.SaveChanges();
     }
 }