public object DeleteSubmission(DeleteSubmissionRequest request) { // Variables. var id = GuidHelper.GetGuid(request.GeneratedId); // Delete the submission. using (var scope = ScopeProvider.CreateScope()) { scope.Database.Delete("FormulateSubmission", "GeneratedId", null, id); } // Indicate success. return(new { Success = true }); }
public object DeleteSubmission(DeleteSubmissionRequest request) { // Variables. var id = GuidHelper.GetGuid(request.GeneratedId); var db = ApplicationContext.DatabaseContext.Database; // Delete the submission. db.Delete("FormulateSubmission", "GeneratedId", null, id); // Indicate success. return(new { Success = true }); }