public bool InsertAsync(Works model) { if (model == null) { throw new ArgumentNullException("model不能为null"); } return(_worksRepository.InsertAsync(model)); }
public bool InsertAsync(Works model) { if (model == null) { throw new ArgumentNullException("model不能为null"); } if (string.IsNullOrEmpty(model.Name)) { throw new ArgumentNullException("Name不能为null"); } return(_worksRepository.InsertAsync(model)); }