no data exception and no documentation warnings in generated code

This commit is contained in:
2021-11-25 15:33:55 +01:00
parent 26334719de
commit 39528bc248
4 changed files with 32 additions and 63 deletions

View File

@ -12,9 +12,10 @@ namespace de.hottis.genericdatabaseapiservice.Services {
Task<List<TOUT>> ReadBySelect<TIN, TOUT>(string selectStatement, TIN input);
}
public class DbServiceException : Exception {}
public class NotDataFoundException : DbServiceException {}
public class DbService : IDbService {
async public Task<List<TOUT>> ReadBySelect<TIN, TOUT>(string selectStatement, TIN input) {
var itemList = new List<TOUT>();
@ -57,6 +58,11 @@ namespace de.hottis.genericdatabaseapiservice.Services {
}
}
}
if (itemList.Count == 0) {
throw new NotDataFoundException();
}
return itemList;
}
}