This is one possible solution although not very clean:
- Make the property you need to expose to BAL & DAL
internal - Mark
BAL.dll&DAL.dllInternal Visible inassemblyinfo.cs
public class Person
{
public Person(int id)
{
this.Id=id;
}
public string Name { get; set; }
public int Id { get; internal set; }
public int Age { get; set; }
}
AssemblyInfo.cs for Entities.dll
[assembly: InternalsVisibleTo("DAL"), InternalsVisibleTo("BAL")]
That way all your internals will be visible to DAL & BAL. This may not be desirable but I’m just suggesting one possible solution.