public JsonResult GenerateBacklogReport([FromBody] IncomingEmailReportRequest request) { var currentUser = this.User; var id = int.Parse(currentUser.Claims.ElementAt(1).Value); var account = default(UserAccounts); using (var context = new DatabaseController(Context, Configuration)) { account = context.GetUserAccount(id); var getBacklogWorkItems = context.BackgroundWorkItems(request.Items); using (var notificationManager = new DataHandlers.NotificationHandler(Configuration)) { notificationManager.GeneraBacklogReport(getBacklogWorkItems, account); } } return(Json(new object {})); }
public JsonResult GenerateBacklogReport([FromBody] IncomingEmailReportRequest request) { var account = default(UserAccounts); using (var context = new UsersContext(Context, Configuration)) account = context.GetUserAccount(UserId); using (var context = new WorkItemsContext(Context, Configuration)) { var getBacklogWorkItems = context.BackgroundWorkItems(request.Items); using (var notificationManager = new DataHandlers.NotificationHandler(Configuration)) { notificationManager.GeneraBacklogReport(getBacklogWorkItems, account); } } return(Json(new object {})); }