Skip to content

Instantly share code, notes, and snippets.

@bradoyler
Created December 7, 2012 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradoyler/4233590 to your computer and use it in GitHub Desktop.
Save bradoyler/4233590 to your computer and use it in GitHub Desktop.
Simple example Controller for RavenDB using StructureMap
private readonly IDocumentSession session;
public HomeController(IDocumentSession s)
{
session = s;
}
public ActionResult Index()
{
var tempObject = Tuple.Create("Hello World!", DateTime.Now);
session.Store(tempObject);
session.SaveChanges();
return View();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment