Created
March 4, 2015 06:29
-
-
Save jahands/eae930bb57fd5ec0ebe1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class User : IPerson, ICredential | |
{ ... } | |
public class UserConfiguration : EntityTypeConfiguration | |
{ | |
// Add already made configurations for IPerson and ICredential | |
ConfigureAnyType(this, typeof(User)); | |
} | |
public static void ConfigureAnyType(EntityTypeConfiguration<Type> entity, Type modelType) | |
{ | |
delegate configureDelegates; | |
// Don't have the LINQ correct here.. | |
// Basically want to add the delegate for each interface 'entity' inherits from | |
configureDelegates += configDelegateDict.Any(t => t.Value).Where(u => u.Key == type); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment