Custom Orchard Module to SQL

Topics: Core, Customizing Orchard, Writing modules
Apr 23, 2013 at 11:05 PM
What I am trying to do is create a module that queries the orchard database of custom Orchard tables, created custom using sql query (CREATE TABLE ...)

The table will have user specific information (Orchard created users) that will have custom values associated to these users. I want to return the custom values based on the user that is logged in.
  1. I want to know if this is even possible. I want to have full control over what I display for the user potentially with a Stored Procedure called upon (Custom of course). My natural instinct is to use the general MVC technique of populating a model from a controller and displaying to a view.
  2. I also want to have a submit button on the page and once the user submits the system will update said database. I am 100% fine with putting a connection string in the C# of the controller.
Is this possible?

What I have tried was to create the "HelloWorld" module

http://docs.orchardproject.net/Documentation/Building-a-hello-world-module

and add onto that by adding a "Model" folder and creating a Model; however, I am unsuccessful because I might be using my original understanding of MVC in sending the model from the controller to the view.

Any suggestions would help. Mainly I want to know that it is either not possible or I am going at it wrong considering Orchard's structure.

PLEASE HELP!

Thanking you in advance for your time in response.
May 1, 2013 at 10:40 PM
Any advice on this?
Coordinator
May 2, 2013 at 12:37 AM
Your question is too vague, which is probably why nobody answered. Yes, it is possible, and you can see an example in the OrchardPo module (however, be careful as the code in there breaks on the most recent 1.x because of the move away from transaction scopes).
May 2, 2013 at 4:23 AM
Thanks for the response BertandLeRoy.

I'll research more and post another question that distinctly identifies my issue as I dive deeper into it.

Again, thanks for the response!