This project is read-only.

New module with model

Topics: Writing modules
Dec 26, 2014 at 7:30 AM
Hi All,

I am a new bee in Orchard. I have an existing db. I have created a new module for todolist.
For this I created a new model class.

Now using this how to establish a connection to db server? Hw to do CRUD operations in controller. Any sample or reference will be of great help

Dec 26, 2014 at 6:30 PM
There are a few ways to do this. Easiest is probably simply injecting an IRepository<T>, where T is your model's type.
The IRepository<T> interface has all the methods you need for simple CRUD operations.