This question is locked. New answers and comments are not allowed.
Hi.
I'm trying to a achieve some specific behaviour and it turned out not to be so easy.
Let's say that i in Core project i have:
I have a Test project too. When I want to use entities and metadatasource from Core project, everything works fine.
Problem start when I want to palce some test entities and place them in Test project.
I started from creating TestMetadataSource in Test project and enhacing it. However, either core or test entities configuration was acquired, but never simultaneously.
So how should TestMetadataSource be implemented to acquire mapping configurations from both projects?
I'm trying to a achieve some specific behaviour and it turned out not to be so easy.
Let's say that i in Core project i have:
public class Car : IEntity
{
public virtual int Id { get; set; }
public static MappingConfiguration<
Car
> CreateConfiguration()
{
var userMapping = new MappingConfiguration<
Car
>();
userMapping.MapType(u => new
{
Id = u.Id,
}).ToTable("Car");
userMapping.HasProperty(u => u.Id).IsIdentity(KeyGenerator.Autoinc);
return userMapping;
}
}
and
public class MyFluentMetadataSource : FluentMetadataSource
{
protected override IList<
MappingConfiguration
> PrepareMapping()
{
return new List<
MappingConfiguration
>();
}
}
I have a Test project too. When I want to use entities and metadatasource from Core project, everything works fine.
Problem start when I want to palce some test entities and place them in Test project.
I started from creating TestMetadataSource in Test project and enhacing it. However, either core or test entities configuration was acquired, but never simultaneously.
So how should TestMetadataSource be implemented to acquire mapping configurations from both projects?