Using Custom Collection in Fluent Mapping

4 posts, 1 answers
  1. Dilshod
    Dilshod avatar
    23 posts
    Member since:
    Feb 2012

    Posted 24 Jul 2013 Link to this post

    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!
  2. Answer
    Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 29 Jul 2013 Link to this post

    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.

  3. DevCraft banner
  4. Dilshod
    Dilshod avatar
    23 posts
    Member since:
    Feb 2012

    Posted 30 Jul 2013 Link to this post

    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!

  5. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 31 Jul 2013 Link to this post

    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.

Back to Top