예제 #1
0
파일: Repository.cs 프로젝트: EnvyIT/apollo
 public async Task ValidateNotDeletedById <T>(IBaseDao <T> dao, long id) where T : BaseEntity <T>
 {
     if (!await dao.ExistAndNotDeletedByIdAsync(id))
     {
         var invalidEntityIdException = new InvalidEntityIdException(id, "Entity with this id does not exist!");
         Logger.Error(invalidEntityIdException, "{type} with {id} does not exist!", typeof(T), id);
         throw invalidEntityIdException;
     }
 }