This commit is contained in:
2020-12-29 23:20:39 +00:00
parent 68b55860f2
commit c5daf3340b
6 changed files with 77 additions and 6 deletions

View File

@@ -56,11 +56,9 @@ namespace AyaNova.Api.Controllers
return BadRequest(new ApiErrorResponse(ModelState));
if (id == 0)
return Ok(ApiOkResponse.Response(ayType.ToString()));
using (var command = ct.Database.GetDbConnection().CreateCommand())
{
ct.Database.OpenConnection();
return Ok(ApiOkResponse.Response(BizObjectNameFetcherDirect.Name(ayType, id, command)));
}
return Ok(ApiOkResponse.Response(BizObjectNameFetcherDirect.Name(ayType, id, ct)));
}