コード例 #1
0
 public async Task <SingleResponse <User> > GetById(int id)
 {
     if (NullPropertyVerifier.IsIdValid(id))
     {
         return(await _userDAL.GetById(id));
     }
     return(await SingleResponseModels <User> .FailedSingleModel($"{id.toString()} is not a valid ID."));
 }
コード例 #2
0
 public async Task <Response> Delete(int id)
 {
     if (NullPropertyVerifier.IsIdValid(id))
     {
         return(await _userDAL.Delete(id));
     }
     return(await ResponseModels.FailedResponseModel($"{id.toString()} is not a valid ID."));
 }