Entity Developer Express MVC Controller Templates?

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Tue 02 Jun 2015 18:26

Does Entity Developer Express have MVC controller templates?
Does Entity Developer for dotConnect PostgreSql have the MVC controller templates?

Shalex
Devart Team
Posts: 8034
Joined: Thu 14 Aug 2008 12:44

Re: Entity Developer Express MVC Controller Templates?

Post by Shalex » Wed 03 Jun 2015 12:45

OutOfTouch6947 wrote:Does Entity Developer Express have MVC controller templates?
Yes, it does.
OutOfTouch6947 wrote:Does Entity Developer for dotConnect PostgreSql have the MVC controller templates?
Yes, it does.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Wed 03 Jun 2015 19:46

I have Entity Developer for dotConnect PostgreSql, I don't see the controller templates, where are they located?
I am using visual studio 2012.

Shalex
Devart Team
Posts: 8034
Joined: Thu 14 Aug 2008 12:44

Re: Entity Developer Express MVC Controller Templates?

Post by Shalex » Thu 04 Jun 2015 07:08

1. Entity Developer which works via Devart.Data.PostgreSql is shipped with dotConnect for PostgreSQL Professional Edition. Navigate to the Tools > PostgreSQL > About menu of Visual Studio and make sure that your current edition of dotConnect for PostgreSQL is Professional.
2. The language of your project is Visual C#, isn't it?
3. Please create Devart Entity Model (*.edml) and open it. Then go to Tools > Entity Developer > Model Explorer, right click the Templates node > New Template > Language=Visual C#, select the MVC Controller template.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Mon 08 Jun 2015 16:59

I am using .lqml and I now see the templates I was looking for.
Thanks for all the help!
I still don't see how to use this template, I thought this would create a controller in my controller folder but all I see is the template under the lqml.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Mon 08 Jun 2015 22:14

I keep getting this error when trying to build:

Error 1 No overload for method 'All' takes 0 arguments C:\Development\CallLoggerScore\CallLoggerScore\Controllers\ScorecardsController.cs 39 34 CallLoggerScore

And the code generated by the mvc controller template:

Code: Select all

IQueryable<Scorecard> query = repository.All();

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Entity Developer Express MVC Controller Templates?

Post by MariiaI » Tue 09 Jun 2015 08:12

Please open your *.lqml model, navigate to Tools > Entity Developer > Model Explorer > expand the Templates node and set the Generic Repository Pattern property of the Repository And Unit of Work template to True. Save the model to regenerate the code.
Please tell us if this helps.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Tue 09 Jun 2015 15:31

I checked and it was already set to true I changed it again to try and regenerate the code and I get the same error.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Tue 09 Jun 2015 16:07

Are there any tutorials that I could follow to see if I did something wrong? I have Repository and Unit of Work Template and LinqConnectTemplate is that a mistake? I took the code first approach, although I don't see an option when creating a table to make a field with a unique constraint.

I am looking at the sample application under the LINQ folder and that sample application doesn't use any templates that I see in it. Should I remove everything and start over?

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Tue 09 Jun 2015 19:15

Correction, I started over and removed everything and this fixed the error thanks.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Entity Developer Express MVC Controller Templates?

Post by MariiaI » Wed 10 Jun 2015 10:04

Glad to see that the issue was resolved.
We are sending you two MVC sample projects to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Thu 11 Jun 2015 16:30

I got your sample projects thanks!
I am having an issue in my project when I open the model explorer I don't see anything it is empty.
I can't seem to open the model diagram either, I need some help because I have deleted the lqml and recreated it several times and I am getting the same issue, and I need to be able to update the model.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Entity Developer Express MVC Controller Templates?

Post by MariiaI » Fri 12 Jun 2015 13:20

Most likely, you are opening Model Explorer via the Tools-> Entity Developer menu without opening the necessary LinqConnect model, aren't you?
Please try right-clicking the model file (*.lqml) in the Visual Studio and selecting "Open With..." from the shortcut menu. In the opened window select "Devart Entity Developer", click "Set as Default" and then "OK".
After this the model will be opened and the Model Explorer should contain the corresponding information.
Please tell us if this helps.

OutOfTouch6947
Posts: 79
Joined: Tue 02 Jun 2015 18:22

Re: Entity Developer Express MVC Controller Templates?

Post by OutOfTouch6947 » Wed 08 Jul 2015 22:05

Yes that helped sorry I didn't reply sooner.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Entity Developer Express MVC Controller Templates?

Post by MariiaI » Thu 09 Jul 2015 10:23

Glad to see that the issue was resolved.
If you have any further questions, feel free to contact us.

Post Reply