Project Description
SearchModel is a tool for EF development in collaboration with ASP.NET

You can use the code like this in ASP.NET MVC View
<form action="" method="post">
Email:@Html.TextBox("Email").ForSearch(QueryMethod.Equal)<br />
Id: @Html.TextBox("Id").ForSearch(QueryMethod.Equal)
Birth: @Html.TextBox("Birthday").ForSearch(QueryMethod.Equal)<br />
<input type="submit" value="search" />
   var grid = new WebGrid(Model);
And use the code in Controller
        public ActionResult Index(QueryModel model)
            using(var db=new DbEntities())
                var list = db.Users.Where(model).ToList();
                return View(list);
To convert the form field to the entity framework query expression.

@chsword on

Last edited Dec 31, 2013 at 2:27 AM by chsword, version 13