public async Task <OperationStatus> ManageService(ServiceActionBind serviceActionBind, string userName) { List <SQLParam> sQLParam = new List <SQLParam> { new SQLParam("@PageActionID", serviceActionBind.PageAction.PageActionID), new SQLParam("@SelectedService", serviceActionBind.PageAction.SelectedService), new SQLParam("@UserName", userName) }; try { SQLExecuteNonQueryAsync handler = new SQLExecuteNonQueryAsync(); int result = await handler.ExecuteNonQueryAsync("[usp_PageAction_ManageService]", sQLParam, "@Status"); if (result == 1) { return(new OperationStatus { Message = "Identy scope added successfully.", StatusCode = StatusCode.Created, Result = result }); } return(new OperationStatus { Message = "Something went wrong while Action deleted.", StatusCode = StatusCode.ServerError, Result = result }); } catch (Exception ex) { throw ex; } }
public async Task <OperationStatus> ManageService(ServiceActionBind serviceActionBind, string userName) { PageActionDataProvider provider = new PageActionDataProvider(); return(await provider.ManageService(serviceActionBind, userName)); }