EntityFramework-Reverse-POCO-Code-First-Generator
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard
What takes precedence RegexExclude or RegexInclude?
I am trying to get a single table from a list of many similar named tables, and also excluding related tables that are not needed.
For example, I have around 50 tables called Hotelxxxxxxxxxx, several of these have links to other tables I do require, i.e. PoSInvoice references around five Hotelxxxxx tables, but in this instance, I do not require access to them.
So I created an exclude as follows:
FilterSettings.TableFilters.Add(new RegexExcludeFilter("Hotel.*"));
But I do need one table, so I created then following include.
FilterSettings.TableFilters.Add(new RegexIncludeFilter("HotelFolioItem.*"));
But no matter the order I put them, it does not create the classes for HotelFolioItems.
I really do not want to create 50 rules to exclude each table I don't want, but is that the only way I can do this?
Any advice you can offer would be greatly appreciated.
The exclude filter runs first, then the include filter keeps the remainder. So its already too late if exclude filter has rejected any table you need.
What about Hotel(?!FolioItem).*