Namespace disappeared

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
dgilmour77
Posts: 4
Joined: Thu 28 Feb 2019 23:31

Namespace disappeared

Post by dgilmour77 » Thu 28 Feb 2019 23:35

I am a new user and have no problems adding a model from a database to a small/sample app. However, when I add the same model to my production app (actually, to a library project within a large solution), the namespace does not get created, although the model inserts with no errors, and the model diagram can be redisplayed at will in the entitydeveloper based on the classes that are added. In other words, the LinqConnect classes are added, but the new custom namespace that is needed to reference the types in my model and the DataContext does not appear in the object browser and is not detected by Intellisense.

Any idea what I'm doing wrong?

Thanks

dgilmour77
Posts: 4
Joined: Thu 28 Feb 2019 23:31

Re: Namespace disappeared

Post by dgilmour77 » Mon 04 Mar 2019 15:50

I didn't receive a response on this, but determined that if the solution contains multiple projects and the output locations are not set explicitly at the time the model is generated from the database, the template will not generate the C# classes for the database types. If you leave the output locations blank, the model appears to generate successfully but the classes are missing.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Namespace disappeared

Post by Shalex » Wed 06 Mar 2019 15:32

1. You are using Entity Developer embedded into VS2017, aren't you?

2. Select the *.lqml model in Solution Explorer and make sure that its Custom Tool is set to DevartLinqToSqlGenerator.

3. Open your *.lqml, navigate to Tools > Entity Developer > Model Explorer > the Templates node, select the LinqConnect template, press F4 (Properties) and specify your values of the properties:
a) Type
b) Context Output
c) Entities Output

4. Tell us target framework set in the properties of the project you added *.lqml to.

If this doesn't help, upload a test solution for reproducing to some file exchange server (e.g. www.dropbox.com).

Post Reply