This question is locked. New answers and comments are not allowed.
Hi All,
I am calling a stored proc in LINQ in my model
In the above code GetReps is my stored proc name and it is using the table customers and orders.I don't want to write LINQ because I am trying toc onvert my legacy code to MVC.
In my controller, I have the code below
In my view, I have the code
In my View, I am getting and error for this .Columns(columns => and
cannot use lambda expression as an argument to dynamically dispached operation.without first casting it to delegate.
is it becasue I am using a stord proc in my code.
Any help will be appreciated.
I am calling a stored proc in LINQ in my model
public IQueryable getRep(string ea, int days) { var Data = cr.Getreps(ea, days); return Data.AsQueryable(); }In the above code GetReps is my stored proc name and it is using the table customers and orders.I don't want to write LINQ because I am trying toc onvert my legacy code to MVC.
In my controller, I have the code below
[AcceptVerbs(HttpVerbs.Post)] public ActionResult LoadRep(string ea, int days) { return View(RepData.getRep(ea, days)); }In my view, I have the code
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> GetEA </asp:Content> <% Html.Telerik().Grid(Model) .Name("Grid") .Columns(columns => { columns.Bound(c => c.no); }) .Sortable() .Scrollable(scrolling => scrolling.Height(250)) .Pageable() .Render(); %>In my View, I am getting and error for this .Columns(columns => and
(scrolling => scrolling.Height(250))
The error iscannot use lambda expression as an argument to dynamically dispached operation.without first casting it to delegate.
is it becasue I am using a stord proc in my code.
Any help will be appreciated.