public void ChangePimp(Pimp pimp) { using (var ctxt = GetContext()) { var oldItem = ctxt.Pimps.FirstOrDefault(x => x.Id == pimp.Id); oldItem?.Update(pimp); ctxt.SaveChanges(); } }
public void Update(Pimp entity) { Name = entity.Name; }