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