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

Using Custom Collection in Fluent Mapping

3 Answers 57 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dilshod
Top achievements
Rank 1
Dilshod asked on 24 Jul 2013, 04:47 PM
Hi,
I tried using TrackedList<T> instead of IList<T> with Attribute and Xml mapping type. Basically I followed the documentation how to change the generator to generate TrackedList<T>. Now I am trying to use that with FluentMapping, but I couldn't make it work. Could anyone help me on that please?

Thank you!

3 Answers, 1 is accepted

Sort by
0
Accepted
Doroteya
Telerik team
answered on 29 Jul 2013, 02:58 PM
Hello Dilshod,

Thank you for your feedback.

Indeed, changing the type of the generated collection properties with our Code-Only Mapping approach is a bit different process. Since it was not described in our documentation, we have now enhanced it based on your request, so here you can find a new article that describes what are the steps.

I hope you find that useful. If you have additional questions, do not hesitate to get back to us.


Regards,
Doroteya
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvementsshipped with this release.

0
Dilshod
Top achievements
Rank 1
answered on 30 Jul 2013, 01:55 PM
Thanks for the answer. After following the changes generator didn't generate the code. Then I changed one more line in the FluentMappingGenerator.ttinclude. In "GenerateAssociationConfiguration()" method I thanged this line:
'string hasAssociationToken = this.GetHasAssociationToken(navigationMember.PropertyName);'

to this:

'string hasAssociationToken = this.GetHasAssociationToken(navigationMember);'

Now it works fine!

0
Doroteya
Telerik team
answered on 31 Jul 2013, 08:38 AM
Hi Dilshod,

Thank you for the feedback and excuse us for the inconvenience caused.

Indeed the complete workflow includes passing to the GetHasAssociationToken() method not only the PropertyName property of MetNavigationMember but the rest of its instance too. Thanks to your report, the article is updated with the necessary information.

In addition, please find your Telerik points increased by 200.

In case you experience other issues or have more questions, do not hesitate to get back to us.


Regards,
Doroteya
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvementsshipped with this release.

Tags
Data Access Free Edition
Asked by
Dilshod
Top achievements
Rank 1
Answers by
Doroteya
Telerik team
Dilshod
Top achievements
Rank 1
Share this question
or