How to map collection of enum list<enum>

glant's Avatar

glant

09 Sep, 2010 01:33 AM via web

I am using fluent automapping. I was trying to map a collection list but it failed. I tried googling for it and nothing made sense. only thing i found was to wrap the enum as a class...i hopping for something more better than this. i am open to doing fluent mapping even nhibernate hbm mapping.

  1. Support Staff 2 Posted by James Gregory on 09 Sep, 2010 06:39 AM

    James Gregory's Avatar

    How is it failing?

  2. 3 Posted by yayadavid on 16 Sep, 2010 08:56 PM

    yayadavid's Avatar

    Hi Glant,

    Using list to combine enum values is always difficult to work with even outside FN. I noticed asp.net mvc will always flag it as an error during model binding.

    You may want to consider using bit operations to combine your enums. I have used it this way with much success with FN and asp.net mvc.

    You may also want to check out this article (http://www.codeproject.com/Articles/37921/Enums-Flags-and-Csharp-Oh...) on codeproject for further information on bit operation on enum.

    Happy coding.

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

    You can attach files up to 10MB

    What is 4 times four?