想要避免创建未使用的ASP.NET Identity 2.0的默认表

时间:2016-06-14 17:12:47

标签: asp.net-mvc-5 entity-framework-6 asp.net-identity-2

我在<Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplication2" MinWidth="200" MinHeight="300" Width="200" Height="300"> <Window.Resources> <local:HeightConverter x:Key="HeightConverter" /> </Window.Resources> <!--MainGrid--> <Grid Name="grid"> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <!--AlignmentGrid--> <Grid Grid.Row="0"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*" MinHeight="180"/> <RowDefinition Height="Auto"> </RowDefinition> </Grid.RowDefinitions> <TextBlock Name="head" Grid.Row="0" Text="Header" HorizontalAlignment="Center"/> <Rectangle Name="rect" Grid.Row="1" Fill="Red"/> <RichTextBox Grid.Row="2" VerticalScrollBarVisibility="Visible" Margin="0,5,0,0" VerticalAlignment="Stretch" BorderBrush="#FF818181" BorderThickness="0.5" Background="#FFEEEEEE" FontSize="14"> <RichTextBox.MaxHeight> <MultiBinding Converter="{StaticResource HeightConverter}"> <Binding ElementName="grid" Path="ActualHeight"/> <Binding ElementName="head" Path="ActualHeight"/> <Binding ElementName="rect" Path="ActualHeight"/> <Binding ElementName="foot" Path="ActualHeight"/> </MultiBinding> </RichTextBox.MaxHeight> <FlowDocument> <List> <ListItem> <Paragraph>Lorem</Paragraph> <Paragraph>IpSum</Paragraph> <Paragraph>Lorem</Paragraph> <Paragraph>IpSum</Paragraph> </ListItem> </List> </FlowDocument> </RichTextBox> </Grid> <!--Footer--> <TextBlock Name="foot" Grid.Row="1" Text="Footer" HorizontalAlignment="Center"/> </Grid> </Window> 中创建了具有个人用户帐户的默认MVC5应用程序。 当我运行应用程序并注册用户时,它将添加    在public class HeightConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { double gridHeight = (double)values[0]; double headHeight = (double)values[1]; double rectHeight = (double)values[2]; double footHeight = (double)values[3]; return gridHeight - headHeight - rectHeight - footHeight; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } 中具有给定连接字符串的数据库。    其中有自动创建的以下表格,

Visual Studio 2015

并且只有一个表web.config包含我已注册的用户信息,其他表为空。

所以我想删除那些我不想使用的表,这些是

AspNetUsers     
AspNetRoles       
AspNetUserClaims   
AspNetUserLogins    
AspNetUserRoles    

当我从数据库中删除这些表时,我收到错误(AspNetUsers)等等。

请有人建议我删除这些表格,没有任何错误。

感谢。

0 个答案:

没有答案