i have a really silly question but i cant find my self to know why Visual Studio give me this Error.

I maked a filter Text box in my View and i pass the String to my controller to make a where statement using one of my Model Strings and i get the error on my model String saying its not Invocable.. This is my View part of textbox

@using (Html.BeginForm())
    Filtro Descripcion: @Html.TextBox("SearchString")
    <input type="submit" value="Seach" />

This is my model:

 public partial class Pos
        public System.DateTime Fecha { get; set; }
        public string Rid { get; set; }
        public string Pdv { get; set; }
        public string Pla { get; set; }
        public string Descripcion { get; set; }
        public decimal Total { get; set; }
        public int Cantidad { get; set; }


And this is my controller Index Method that give me the error on my where statement

 public ActionResult Index(string searchString)
            var db = new ArponClientPosContext();
            var students = from s in db.Pos
                           select s;
            if (!String.IsNullOrEmpty(searchString))
                db = db.Pos.Where(s => s.Descripcion(searchString));

            return View("~/Views/HomePos/Index.cshtml", db.Pos.ToList());

exactly this part : db.Pos.Where(s => s.Descripcion(searchString)); it says "Description" is not an invocable object

Can someone explain my why i have this problema or what did i did wrong? Any help wil be apreciated

Related posts

Recent Viewed