Posts

Showing posts from November, 2018

Return Generics ILIST

      public IList GetTeamcallSummary()        {            int currentmonth = DateTime.Today.Month;            int lastmonth = DateTime.Today.AddMonths(-3).Month;                    var calldata = (from c in db.calldetail_viw                where c.ConnectedDate.Value.Month >= lastmonth                      && c.ConnectedDate.Value.Month <= currentmonth                      && c.LocalName == "myaccountrep"                            group c by new { c.AssignedWorkGroup, month = c.ConnectedDate.Value.Month }                into g                select new                {                    WorkGroup = g.Key.AssignedWorkGroup,                    SelectedMonth = g.Key.month,                    TotalRecords = g.Count()                });                      return calldata.ToList();        }