Skip to content

Intermingled Domain and EF Core Infrastructure object trees. #30

@Duslerke

Description

@Duslerke

In the rush of getting first API endpoints delivered in the ASAP manner, there has been a mistake made in the naming of the domain and EF Core entities. Due to the confusion caused by this mix up, a new issue appeared, which is the Domain objects referencing EF Core infrastructure classes (evident from the namespace):

using LBHFSSPublicAPI.V1.Infrastructure;
namespace LBHFSSPublicAPI.V1.Domain
{
public class ServiceEntity
{

The following complex types referenced within this Domain entity are actually EF Core entities:

public File Image { get; set; }
public Organization Organization { get; set; }
public ICollection<ServiceLocation> ServiceLocations { get; set; }
public ICollection<ServiceTaxonomy> ServiceTaxonomies { get; set; }
}

It can be seen better from this snippet made within the text editor:

Screen Shot 2020-10-01 at 15 10 11

Thankfully, the API behaviour is pretty simple and doesn't require much domain processing and hence doesn't cause functionality issues. However I believe we should fix this to keep Domain and Infrastructure object trees separate for at the very least increasing code readability.

Metadata

Metadata

Assignees

Labels

invalidThis doesn't seem right

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions