Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing ASP.NET Universal Providers

The ASP.NET Universal Providers contained in System.Web.Providers are now included with the MVC 4 templates and are being presented as replacements for the Membership and Profile providers that have come with ASP.NET for some time now (SqlMembershipProvider, SqlProfileProvider, SqlRoleProvider). These providers now make use of entity framework (seems like 4.0) for data access and generating their respective tables. The membership entities for example look like this

[EdmEntityType(NamespaceName="System.Web.Providers.Entities", Name="Membership")]
public class MembershipEntity : EntityObject

Is there a way to easily extend the included EntityObjects or tweak the generated db schema to create most customized entities i.e. make columns null-able, add/remove columns?

like image 959
cecilphillip Avatar asked Sep 10 '26 19:09

cecilphillip


1 Answers

To elaborate on Pranav's reply, we are thinking about making our EF DBContext's public so you'll be able to extend them and hopefully customize things the way you like. As of version 1.2 of providers core, we've switched to using Code First internally, and once we verify that the whole extensibilty story all hangs together, we'll make them public.

like image 95
Hao Kung Avatar answered Sep 14 '26 13:09

Hao Kung