Я пытаюсь создать музыкальный магазин, в котором я пытаюсь использовать луковую архитектуру с первым подходом к EF-коду. Правильна ли структура?
Core.Domain
namespace MusicCDStore.Core.Model
{
public class MusicCD
{
string name;
int qty;
string moviename;
string director;
string languageCategory;
float price;
int quantity;
}
}
namespace MusicCDStore.Core.Model
{
class User
{
string username;
string password;
enum userType
{
Customer=1,
Admin=0
}
}
}
namespace MusicCDStore.Core.Model
{
class Admin : User, IAdminFunctions
{
public void addMusicCD()
{
throw new NotImplementedException();
}
}
}
class Customer<T>:User,ICustomerFunctions,ISearch<T>
{
public List<MusicCD> wishList;
public void addToWishList()
{
throw new NotImplementedException();
}
public void buy()
{
throw new NotImplementedException();
}
public void getOrders()
{
throw new NotImplementedException();
}
public void searchBy(T searchType)
{
throw new NotImplementedException();
}
public void vote()
{
throw new NotImplementedException();
}
}
}
Core.Interfaces
namespace MusicCDStore.Core.Interfaces
{
interface ISearch<T>
{
void searchBy(T searchType);
}
}
namespace MusicCDStore.Core.Interfaces
{
interface ICustomerFunctions
{
void buy();
void addToWishList();
void getOrders();
void vote();
}
}
namespace MusicCDStore.Core.Interfaces
{
interface IAdminFunctions
{
void addMusicCD();
}
}
Инфраструктура
У меня есть AdminRepository, CustomerRepository, SearchRepository, которые будут реализовывать интерфейсы, присутствующие в Domain.Interfaces. У меня также есть классы MusicCDContext и UserDbContext, которые будут иметь связанные с БД действия для сущностей, присутствующих в Core.Domain.
Структура кода

Какие изменения я должен внести в модель?