I am trying to modify users' awesome and crazy table names from AspNETUsers.
My project is a webform website project I'm using Visual Studio 2012 , Entity Framework 6 and Framework 4.5 I have set up complete identity content, and everything is working properly .
Now I need to rename the tables I if I'm just puts the following code:
protected override void OnModelCreating (DbModelbuilder modelBuilder) {base.OnModelCreating (ModelBuilder) ; // It needs to go before other rules! ModelBuilder.Entity & LT; IdentityUser & gt; () ToTable ("Users"). ModelBuilder.Entity & LT; IdentityRole & gt; () ToTable ("roles") .; ModelBuilder.Entity & LT; IdentityUserRole & gt; () ToTable ("UserRoles") .; ModelBuilder.Entity & LT; IdentityUserLogin & gt; () ToTable ("UserLogins") .; ModelBuilder.Entity & LT; IdentityUserClaim & gt; () ToTable ("UserClaims") .; } The ApplicationDbContext class in
, it has not been executed, and if I try to change the table name manually, I get the error:
I invalid Aident name 'dbo.AspNetUsers'
after you follow a few tips I enable-migration account-migration and update-database try running the command, but I First of all there is an error:
PM & gt; Able-migration -warboj
startup project System.ArgumentException Using 'Mayprosennam intended NuGet project' MyProjectName 'use': The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
Server stack trace: EnvDTE.Properties.Item (object index) on SystemkRuntimekRemotingkMessagingkStackBuilderSinkk_PrivateProcessMessage (on IntPtr md, object [] args, object server, object [] & amp; outArgs) (iMessage message System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage)
exceptions rethrown [0]: System.Runtime.Remoting System on proxies. On EnvDTE.Properties.Item (object index) on Deta.antiti.amiageshn ReelProxy.HandleReturnMessage (IMessage reqMsg, IMessage retMsg) system. From time to time. Remoting.Proxies.RealProxy.PrivateInvoke (MessageData and msgData, Int32 type). Project Extension in System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade (String ConfiName, Boolean UserContactWorking Directory) in string contextTypeName (System Reference) on System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable Project Extensions .GetPropertyValue [T] (Project Project, String Properties Name).) On System.Data.Entity.Migrations.EnableMigrationsCommand. & Lt;> c__DisplayClass2 & LT; The parameter is not correct on .ctor> b__0 () System.Data.Entity.Migrations.MigrationsDomainCommand.Execute (Action command). (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
please give me some directions, because I do not know what to put where my hands now
< after div class = "text" itemprop = "text">
at issue:
EntityFramework is not complete
So the only way is to create a web application project and have all the existing code displaced.
No comments:
Post a Comment