Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "exlnt"

<cite>alper: </cite> The rendering is done in this javascript file jquery.jtable.record-actions.js So it must be included in your layout. Can you check it?

Thank you very much! That script was missing from the BundleConfig.cs file! Its working now!

One other issue/question.

In my downloaded template I do not see the "Tenant Subscription System & Payment Integration" and dashboard updates. Are these things NOT built into the MVC template?

<cite>ismcagdas: </cite> Hi @exlnt,

Can you also share the error message ?

Thanks.

It is the same one I posted in this thread and when I started this thread.

FATAL 2017-06-21 10:28:52,592 [1    ] Abp.AbpBootstrapper                      - System.InvalidOperationException: Unable to determine the relationship represented by navigation property 'User.DeleterUser' of type 'User'. Either manually configure the relationship, or ignore this property from the model.
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.PropertyMappingValidationConvention.Apply(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnModelBuilt(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
Answer

<cite>ismcagdas: </cite> Hi @exlnt,

Can you first try to clear cookies and then try again ? If this does not fix your problem, please send your project to <a href="mailto:[email protected]">[email protected]</a>.

Thanks.

Ok, that worked! Thanks!

Answer

Can someone from support team please respond to this issue?

I just repeated all my steps from 1 again. This time I added one very simple entity that has no FKs. I tried to scaffold the migration for this table and ran into the error.

Here is my simple entity:

public partial class InvCtry
    {
        public InvCtry()
        {
        }

        public string CtryIsoAlphaCd { get; set; }
        public string CtryNm { get; set; }
        public string CtrySrceCd { get; set; }
        public string EnblIn { get; set; }

    }

I tried again with my template this morning and no matter what kind of custom entity I add into the solution I keep getting the same error.

DEBUG 2017-06-21 10:28:50,191 [1    ] Abp.AutoMapper.AbpAutoMapperModule       - MyCo.MyApp.Web.Views.Shared.Components.TenantChange.TenantChangeViewModel
FATAL 2017-06-21 10:28:52,592 [1    ] Abp.AbpBootstrapper                      - System.InvalidOperationException: Unable to determine the relationship represented by navigation property 'User.DeleterUser' of type 'User'. Either manually configure the relationship, or ignore this property from the model.
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.PropertyMappingValidationConvention.Apply(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnModelBuilt(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
   at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass16_0.&lt;RealizeService&gt;b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c.&lt;AddQuery&gt;b__1_3(IServiceProvider p)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass16_0.&lt;RealizeService&gt;b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.DbContext.get_QueryProvider()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.&lt;.ctor&gt;b__3_0()
   at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.System.Linq.IQueryable.get_Provider()
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
   at MyCo.MyApp.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.CreateEditions() in C:\GIT-MyApp-RA5\MyApp-.net-core\MyCo.MyDept.MyApp\src\MyCo.MyApp.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 24
   at MyCo.MyApp.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.Create() in C:\GIT-MyApp-RA5\MyApp-.net-core\MyCo.MyDept.MyApp\src\MyCo.MyApp.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 19
   at MyCo.MyApp.EntityFrameworkCore.Seed.Host.InitialHostDbBuilder.Create() in C:\GIT-MyApp-RA5\MyApp-.net-core\MyCo.MyDept.MyApp\src\MyCo.MyApp.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\InitialHostDbBuilder.cs:line 14
   at MyCo.MyApp.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(MyAppDbContext context) in C:\GIT-MyApp-RA5\MyApp-.net-core\MyCo.MyDept.MyApp\src\MyCo.MyApp.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 25
   at MyCo.MyApp.EntityFrameworkCore.Seed.SeedHelper.WithDbContext[TDbContext](IIocResolver iocResolver, Action`1 contextAction) in C:\GIT-MyApp-RA5\MyApp-.net-core\MyCo.MyDept.MyApp\src\MyCo.MyApp.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 41
   at MyCo.MyApp.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(IIocResolver iocResolver) in C:\GIT-MyApp-RA5\MyApp-.net-core\MyCo.MyDept.MyApp\src\MyCo.MyApp.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 17
   at MyCo.MyApp.EntityFrameworkCore.MyAppEntityFrameworkModule.PostInitialize() in C:\GIT-MyApp-RA5\MyApp-.net-core\MyCo.MyDept.MyApp\src\MyCo.MyApp.EntityFrameworkCore\EntityFrameworkCore\MyAppEntityFrameworkModule.cs:line 40
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Abp.AbpBootstrapper.Initialize()

I took the error text from the log file this time and it seems to be pointing to the tenant view model?

MyCo.MyApp.Web.Views.Shared.Components.TenantChange.TenantChangeViewModel
Answer

I just downloaded v4.1 for my MVC template. All I have done so far is update the connection string. I have not made any other changes to the downloaded template. Every page reports the below error on chrome console. [attachment=0:3n2izge8]Screenshot (47).png[/attachment:3n2izge8] None of the JTable grids are loading.

@ismcagdas - Thank you very much!

One other issue I am having on this same template is with the localization function "L". I copied the tenant index view and just updated the fields for my custom entity. On my new copied page I keep getting error "L does not exist in this context" I have all the same using statements and my controller inherits from the same base controller. My page, controller and views are all located in the Areas/App/ folder structure.

I just replicated the problem with a fresh template download just now.

Steps:

  1. Download .Net Core 1.1 MVC template from ABP site.
  2. Open solution and add connection string
  3. Set Migrator project as startup project
  4. Run solution, allow migrator to create host and tenant DB
  5. Run app, all normal, ABP default site opens and works normally
  6. Add custom entity into MyProject.Core project
  7. Add custom entity DBSet entry into context file in MyProject.EntityFrameworkCore project
  8. Run the application - You get error, app does not load.
  9. Try to add migration for the custom entities - You get error, migration NOT created.
  10. Remove all references to custom entities from context file in MyProject.EntityFrameworkCore project
  11. Run app - You get error, app does not load

Here is the complete error message.

System.InvalidOperationException: Unable to determine the relationship represented by navigation property 'User.DeleterUser' of type 'User'. Either manually configure the relationship, or ignore this property from the model.
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.PropertyMappingValidationConvention.Apply(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnModelBuilt(InternalModelBuilder modelBuilder)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
   at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass16_0.&lt;RealizeService&gt;b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c.&lt;AddQuery&gt;b__1_3(IServiceProvider p)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.&lt;&gt;c__DisplayClass16_0.&lt;RealizeService&gt;b__0(ServiceProvider provider)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.DbContext.get_QueryProvider()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.&lt;.ctor&gt;b__3_0()
   at Microsoft.EntityFrameworkCore.Internal.LazyRef`1.get_Value()
   at Microsoft.EntityFrameworkCore.Internal.InternalDbSet`1.System.Linq.IQueryable.get_Provider()
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
   at Exlnt.RemodelOps.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.CreateEditions() in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 24
   at Exlnt.RemodelOps.EntityFrameworkCore.Seed.Host.DefaultEditionCreator.Create() in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\DefaultEditionCreator.cs:line 19
   at Exlnt.RemodelOps.EntityFrameworkCore.Seed.Host.InitialHostDbBuilder.Create() in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.EntityFrameworkCore\EntityFrameworkCore\Seed\Host\InitialHostDbBuilder.cs:line 14
   at Exlnt.RemodelOps.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(RemodelOpsDbContext context) in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 25
   at Exlnt.RemodelOps.EntityFrameworkCore.Seed.SeedHelper.WithDbContext[TDbContext](IIocResolver iocResolver, Action`1 contextAction) in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 41
   at Exlnt.RemodelOps.EntityFrameworkCore.Seed.SeedHelper.SeedHostDb(IIocResolver iocResolver) in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.EntityFrameworkCore\EntityFrameworkCore\Seed\SeedHelper.cs:line 17
   at Exlnt.RemodelOps.EntityFrameworkCore.RemodelOpsEntityFrameworkModule.PostInitialize() in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.EntityFrameworkCore\EntityFrameworkCore\RemodelOpsEntityFrameworkModule.cs:line 40
   at System.Collections.Generic.List`1.ForEach(Action`1 action)
   at Abp.AbpBootstrapper.Initialize()
   at Abp.AspNetCore.AbpApplicationBuilderExtensions.UseAbp(IApplicationBuilder app, Action`1 optionsAction)
   at Exlnt.RemodelOps.Web.Startup.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) in D:\VisualStudioOnline\RemodelOps\src\Exlnt.RemodelOps.Web.Mvc\Startup\Startup.cs:line 56
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

I did one more test.

  1. I removed all my custom entities from the dbContext file.
  2. I add one simple entity with just 3 properties and then added that to dbContext file.
  3. Ran add-migration cmd via pkg manager console and still the same error is reported. Basically the minute I introduce any type of custom entity in the solution the error comes up, during add migration or in the browser when you run the app.
Showing 121 to 130 of 263 entries