are we using EF Core 2.0, yet? It has been released!
Hi, I made the merge with my development code and it seems to be working just fine thx
I am not adding it to DbContext!
My Address class: [ComplexType] public class Address : ValueObject<Address> { public Country Country { get; private set; } //A reference to a Country entity. public string City { get; private set; }
public string Street { get; private set; }
public string PostalCode { get; private set; }
public int Number { get; private set; }
public Address(Country country, string city, string street, int number, string postalCode)
{
Country = country;
City = city;
Street = street;
Number = number;
PostalCode = postalCode;
}
}
trying to add migration I get:
PM> Add-Migration "Add_Address"
System.InvalidOperationException: The entity type 'Address' requires a primary key to be defined.
at Microsoft.EntityFrameworkCore.Internal.ModelValidator.ShowError(String message)
at Microsoft.EntityFrameworkCore.Internal.ModelValidator.Validate(IModel model)
at Microsoft.EntityFrameworkCore.Internal.RelationalModelValidator.Validate(IModel model)
at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, IModelValidator validator)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func
2 valueFactory)
at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
at Microsoft.EntityFrameworkCore.Internal.LazyRef1.get_Value() at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.<RealizeService>b__0(ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProvider.<>c__DisplayClass16_0.<RealizeService>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.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0
1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
The entity type 'Address' requires a primary key to be defined.
yes
from what I can see, eventcloud application also does not retrieve emailaddress!!!
any solution for this issue?
<cite>hikalkan: </cite> Hi,
It seems related to facebook or your app settings on the facebook. For example, it's working for our demo and for our example projects (try it: <a class="postlink" href="http://eventcloud.aspnetboilerplate.com/">http://eventcloud.aspnetboilerplate.com/</a>). Maybe there is a setting you should enable on your facebook developer page. It's better to get support from comunity or directly from facebook, since we are using Microsoft.Owin.Security.Facebook package, which is faily common. Have a nice day.