In a MVC project if I put LINQ queries in Model
, is it against the MVC Pattern?
namespace DocLibrary.Models
{
public class Auth
use like this
internal IQueryable GetArmyList2()
{
//var lists = from list in db.Table1
// select list;
//return lists;
var query = from Table1 in db.Table1
where Table1.Username.Equals("asik") & Table1.Password.Equals("asik")
select Table1;
return query;
}
and controller code
public ActionResult asik()
{
var armyList = cl.GetArmyList2();
return View(armyList);
// return View();
}