示例#1
0
        public async Task <AcademicRank> Create(AcademicRank entity)
        {
            var rank = _repositoryAcademicRank.FirstOrDefault(x => x.Id == entity.Id);

            if (rank != null)
            {
                throw new UserFriendlyException("Academic Rank Already exist");
            }

            else
            {
                return(await _repositoryAcademicRank.InsertAsync(entity));
            }
        }
示例#2
0
 public void Update(AcademicRank entity)
 {
     _repositoryAcademicRank.Update(entity);
 }