sqlite - Specified Cast is not valid error in entity framework 4.3 code-first -


i use generic repository mvc , entity framework. in 1 of controller actions filter repostiory expression got "specified cast not valid" error. here code use:

model.showrooms = _showroomrepositoy.getmany(q => q.provinceid == pid && q.districtid == did); 

and showroom entity :

public class showroom     {         public long id { get; set; }         public string name { get; set; }         public bool? ishipermarket { get; set; }         public bool? isexpress { get; set; }         public string address { get; set; }         public long provinceid { get; set; }         public long districtid { get; set; }         public string info { get; set; }         public string servicetime { get; set; }          public virtual province province { get; set; }         public virtual district district { get; set; }     } 

here getmany code, in repositorybase:

public virtual ienumerable<tentity> getmany(expression<func<tentity, bool>> where)         {             return dbset.where(where).tolist();         } 

i couldn't find solution or error at.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -