Search code examples
asp.netconfigurationmembershipprovider

asp.net membership config specification


I'm looking at the ado.net ef membership provider and notice they have something a little different to register the provider

type="OmidID.Web.Security.EFMembershipProvider`2[
                    [OmidID.Web.Security.Default.DefaultUser,
                         OmidID.Web.Security.EFMembershipProvider],
                    [System.Int64]], OmidID.Web.Security.EFMembershipProvider"

I've never seen the bits in square brackets before and took a look around and can't seem to find what they allude to, I'm guessing its setting the type of user but I'm not sure.

Is this configuration specified somewhere? what does it mean?


Solution

  • The type is Generic, the square brackets indicate what types the generic type should be used with. In this case the EFMembershipProvider class has 2 generic parameters that should have the types OmidID.Web.Security.Default.DefaultUser in the Assembly OmidID.Web.Security.EFMembershipProvider and System.Int64. The EFMembershipProvider class itself is in the Assembly OmidID.Web.Security.EFMembershipProvider.

    See the MSDN documentation on GetType for more information on how to express generic type names as strings.