This is a migrated thread and some comments may be shown as answers.

Fluent Mapping and model separated in different assemblies

4 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alain
Top achievements
Rank 1
Alain asked on 29 Nov 2011, 10:17 AM
Hello,

Open Access version: 2011.3 1116
Open Access use: Fluent Mapping (Code-only)

We would like to have the following separation in one of our projects:

  •     Assembly A: objects of our model
  •     Assembly B: mapping by Telerik with the use of Fluent Mapping.
  •     Web Application: Use assemblies A and B.

Contraints: Assembly A cannot be modified at all (impossible to add or modify files), so no possibilty to add our derived class of FluentMetadataSource inside.

We understand that Assembly A must be enhanced with the tool Enhancer.exe to be used with Fluent Mapping, by adding <import> directive in the Assembly A project file, but with our contraints, we cannot modify any files of the Assembly A.

So, how we can use Fluent Mapping with our separation in our project?

Thank you,
Best regards
Alain

4 Answers, 1 is accepted

Sort by
0
Alain
Top achievements
Rank 1
answered on 30 Nov 2011, 04:07 PM
Hello,

I saw that my problem has been discussed in this post in March 2011:

http://www.telerik.com/community/forums/orm/design-time/fluent-mapping-problem-separating-metadatasource-from-entities.aspx

Depending of what was discusssed in this post, I have 2 questions for Telerik people:
  • Is there a progression about this situation?
  • How can we use Enhancer manually? (some examples)

Thank you,
Best regards,
Alain
0
Serge
Telerik team
answered on 02 Dec 2011, 09:56 AM
Hello Alain,

 I am sorry to disappoint you however the situation is still the same. This is a functionality that we have not worked on and currently we do not have plans for it. However we will take your request into consideration when planning our future development. 

I would like to point out though that what the enhancer does is actually decompiling the assembly and then recompiling it back, with the plumbing code needed included in your classes. This is in fact changing the assembly. Is this something that violates the constraints that you have? 

Do let us know if you need further information.

Greetings,
Serge
the Telerik team

Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Alain
Top achievements
Rank 1
answered on 05 Dec 2011, 06:54 AM
Hello Serge,

> This is in fact changing the assembly. Is this something that violates the constraints that you have?

Yes.
The assembly A can be decompiled to get information for Enhancer application, but adding information in it is not possible.

Best regards,
Alain


0
Serge
Telerik team
answered on 07 Dec 2011, 11:58 AM
Hello Alain,

 I am afraid this will render using OpenAccess impossible in your project. In order to use OpenAccess you have to be able to enhance (and by this I mean change a bit) the assembly containing the classes that you want to use for persistance. 

What I mean to say is that even if the mapping information is stored in a separate assembly and can be used by the enhancer, it still has to run over the assembly containing the classes and modify it. A workaround would be to create mirror objects in the assembly that you have control of and map them instead, but I guess that is not the best solution and I would advice you against it. 

I am sorry for the inconvenience that this has caused you. Do let us know if there is anything else that we can do for you.

Kind regards,
Serge
the Telerik team

Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Alain
Top achievements
Rank 1
Answers by
Alain
Top achievements
Rank 1
Serge
Telerik team
Share this question
or