public void Add(MSDS_Customer entity) { if (_context.MSDS_Customer.Any(x=> x.Phone == entity.Phone)) { throw new Exception(string.Format("该手机号已被注册")); } _context.MSDS_Customer.Add(entity); }
public void Delete(MSDS_Customer entity) { _repository.Delete(entity); }
public void Add(MSDS_Customer entity) { _repository.Add(entity); }
public void Delete(MSDS_Customer entity) { _context.MSDS_Customer.Remove(entity); }