The database that I need to create DAL for is designed with several schemas, which causes me some problems:
So, for example, we will consider these tables in two separate schemes (Suppliers, offers)
- Suppliers. Suppliers
- Suppliers.Types
- Deals.Deals
- Deals.Types
I have in C #
namespace Data.Entities.Suppliers
{
public class Suppliers { }
public class Types { }
}
namespace Data.Entities.Deals
{
public class Deals { }
public class Types { }
}
namespace Data.Repositories
{
public class EfDataContext: DbContext
{
public DbSet<Suppliers.Suppliers> Suppliers { get; set; }
public DbSet<Suppliers.Types> SupplierTypes { get; set; }
public DbSet<Deals.Deals> Deals{ get; set; }
public DbSet<Deals.Types> DealTypes { get; set; }
}
}
but EF is disabled if there are two things called "Types", how can I fix these two issues using only DbSet?
NOTES: I am trying to get away from the .edmx file.
source
share