Very strange. This blows up.
[AcceptPost, ValidateInput(false)]//, TransactionPerRequest]
public ActionResult Submit(NewSolutionForm model)
{
using (var tx = new TransactionScope())
{
session.Load<Problem>(model.ProblemId);
var submission = new Submission();
session.Save(submission);
bus.Send(new JudgeSubmission {SubmissionId =
submission.Id});
tx.Complete();
}
return this.RedirectToAction<HomeController>(x =>
x.Index());
}
and this doesn't:
public ActionResult Submit(NewSolutionForm model)
{
using (var tx = new TransactionScope())
{
//session.Load<Problem>(model.ProblemId);
var submission = new Submission();
session.Save(submission);
bus.Send(new JudgeSubmission {SubmissionId =
submission.Id});
tx.Complete();
}
return this.RedirectToAction<HomeController>(x =>
x.Index());
}
neither does this:
public ActionResult Submit(NewSolutionForm model)
{
session.Load<Problem>(model.ProblemId);
using (var tx = new TransactionScope())
{
var submission = new Submission();
session.Save(submission);
bus.Send(new JudgeSubmission {SubmissionId =
submission.Id});
tx.Complete();
}
return this.RedirectToAction<HomeController>(x =>
x.Index());
}
Problem and Submission classes are simple entities wtihout anything
except for Id (hi/lo-generator). Use Fluent NH for the mappings. Still
fail to isolate and reproduce the issue.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---