hello all,
This particular query is giving me an error please tell where am I going wrong
public IList <BC_FeedbackBy> GetFeedbackList()
{
int feedbackId = 0;
string feedbackName = string.Empty;
using (brandconnectionsEntities modelObject = new brandconnectionsEntities())
{
return (IList<BC_FeedbackBy>)(from s in modelObject.BC_FeedbackBy
select new
{
feedbackId =s.FeedbackById ,
feedbackName=s.FeedbackBy ,
})
.ToList ();
}
}
error is
Unable to cast object of type 'System.Collections.Generic.List
`1[<>f__AnonymousType0`2[System .Int32,System.String]]' to type
'System.Collections.Generic.IList`1[BrandConnectionsPrototype.Models.BC_FeedbackBy]'.