How can I change code generation strategy to "Default" while creating ADO.net entity model class? When .edmx file is generated, it contains .tt files. I deleted those and want to regenerate using default code generation strategy. I was able to do this in Visual Studio 2012 but can't do this anymore in Visual Studio 2013. Code generation strategy is set to T4 and I can't regenerate the files. Any help?
I'm working with asp.net webform so I'm not sure my answer would be helpful to u or not...However This is my solution...
1.remove the last edmx file.
2.remove the last connection string.
3.add ado.net entity model again and set options like before.
4.DO NOT remove .tt files and DO NOT try to change code strategy generation.
5.rebuild solution.
6.I believe now you would see a lot of errors about AddObject
and DeleteObject
...Just change This two to Add and Remove (note that for deleteObject
you may not have had to write table name before but for remove you should do that).
for example: db.News.AddObject(N);
changes to db.News.Add(N);
and db.News.DeleteObject(N);
changes to db.News.Remove(N);
and db.DeleteObject(N);
changes to db.News.Remove(N);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With