Inserting data using Linq C# with MVC 3 Architecture in asp.net
I m inserting data using controller,
SignUpcontroller.cs
[HttpPost]
public ActionResult Index(SignUpModel sm)
{
using(DataClassesDataContext dc= new DataClassesDataContext())
{
Dummytable dm= new Dummytable();
{
dm.Name=sm.password;
}
//then conncetion string and submit
}
}
and redirection
My question is, is it correct to write this code in the controller module
or do i need to write it in models module, if i need to write it in models
module then how to define the setter help me out
No comments:
Post a Comment