public async Task <IActionResult> CaseTypeDeleteByIdAsync(int id) { var req = new CaseTypeDeleteByIdRequest { Id = id, CurrentUser = User.CurrentUserName() }; var result = await _caseTypeManager.DeleteCaseTypeByIdAsync(req); return(Ok(result)); }
public async Task <CaseTypeDeleteByIdResponse> DeleteCaseTypeByIdAsync(CaseTypeDeleteByIdRequest req) { using (var conn = new SqlConnection(_connectionSettings.DefaultConnection)) { var result = new CaseTypeDeleteByIdResponse(); const string storeproc = @"[dbo].[uspCaseTypesDelete_New]"; await conn.OpenAsync(); var dynParm = new { ID = req.Id, LastUpdatedBy = req.CurrentUser, LastModifiedDate = req.UpdatedDate }; await conn.ExecuteAsync(storeproc, dynParm, null, null, CommandType.StoredProcedure); return(result); } }
public async Task <CaseTypeDeleteByIdResponse> DeleteCaseTypeByIdAsync(CaseTypeDeleteByIdRequest req) { req.UpdatedDate = DateTime.Today; return(await _repos.DeleteCaseTypeByIdAsync(req)); }