I have a Model first approach where I generate a DBContext file. So I get Addressbook.Context.tt and Addressbook.tt. Within the last file my classess are defined. When I build I dont get any errors, but when I run the application and when I go to some view
that needs a model it will fail. Because of the simpel fact it suspects within the Model folder a model to be find, but it aint there anymore because I generated those .tt files. I could do within my index page @model Addressbook.Customer, but then my lambda
doesnt recognize the properties within it. So what do I need to do and how? Do i need to make some models out of the tt files? And what happens to the mapping part? Or how does this all work?
SpaceLama
Member
171 Points
136 Posts
DBContext CodeGenerator
Jan 15, 2013 05:28 PM|LINK
Hello Everyone,
I have a Model first approach where I generate a DBContext file. So I get Addressbook.Context.tt and Addressbook.tt. Within the last file my classess are defined. When I build I dont get any errors, but when I run the application and when I go to some view that needs a model it will fail. Because of the simpel fact it suspects within the Model folder a model to be find, but it aint there anymore because I generated those .tt files. I could do within my index page @model Addressbook.Customer, but then my lambda doesnt recognize the properties within it. So what do I need to do and how? Do i need to make some models out of the tt files? And what happens to the mapping part? Or how does this all work?
Greetings,
Spacelama
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: DBContext CodeGenerator
Jan 17, 2013 12:36 AM|LINK
Can you show us your full codes?
And please point out at which statement your intellisense cannot be recognized?