c# - Type or namespace name could not be found -


i use this:

   public class constructionrepository     {         private crdatacontext db = new crdatacontext();          public iqueryable<material> findallmaterials()         {             //return db.materials;             var materials = m in db.materials                             join mt in db.measurementtypes on m.measurementtypeid equals mt.id                             select new material                             {                                 mat_name =  m.mat_name,                                 measurementtypeid =  mt.name,                                   mat_type = m.mat_type };             return materials.asqueryable();         }     } 

it gives me error

  1. 'crmvc.models.material' not contain definition 'matid','mesname','mestype'

edit: 'matid','mesname','mestype' fake names gave wrong..

the material class must have settable properties same names used in select new material { ... } clause, can't make these up.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -