Entity framework - sharing multiple tables between multiple applications

We are trying to figure out a way to share tables between internal applications so that we can have a single dataset for such common things as "Users and Departments".

If we have simple models, such as:

public class User
{
    public int Id { get; set; }
    public string Username { get; set; }
    public virtual IQueryable<Department> Departments { get; set; }
}

public class Department
{
    public int Id { get; set; }
    public string Name { get; set; }
    public virtual IQueryable<User> Users { get; set; }
}

We are currently duplicating users (both departments and user> department maps) for each application they use, and this is becoming a service nightmare.

How can we share multiple tables between multiple applications that would otherwise have completely different models and data?

Does it use a sub table (still duplicated in size) for these models with a master table that updates all the slave tables when updated?

Multi-Tenant EF 6, , . ?

Edit:

/ , , - :

public class AppBHuzzah
{
    public int Id { get; set; }
    public string Name { get; set; }
    public int UserId { get; set; }
    public virtual User User { get; set; }
}

public class AppAFoo
{
    public int Id { get; set; }
    public DateTime DateTime { get; set; }
    public int UserId { get; set; }
    public virtual User User { get; set; }
}
+3
2

, , . , , .

. , . , , . . , , . , . , , - .. , , ..

, , , " " (MDM). , :

  • (, , , ) . , .
  • , , , API MDM, . , , , ..

MDM. MDM, , . . , Oracle , . , . DBA, 3 . Mule ESB , API (XML, JSON, BSON, SOAP) , Java .NET. , .

+3

Microsoft , SQL Server 2012 , . MSDN, , .

. Linked Server " " . , , " " .

, !

+2

All Articles