예제 #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();
     }
 }