Hi all,
I have a datamodel used by multiple application that I now needs to be used by other developers outside the team. The model should only be made partialy available to the developers.
I wonder how I best approach this: my current approach is to create a new project that just copies the orginal model and only include the requested properties.
for example
namespace Model
{
public class Car
{
private double m_speed;
private FuelType m_fuelType;
public double Speed
{
get { return m_speed; }
set { m_speed = value; }
}
public FuelType FuelType
{
get { return m_fuelType; }
set { m_fuelType = value; }
}
}
}
In my Lite Model I only want to expose the speed:
using Model;
namespace ModelLite
{
public class Car
{
private Model.Car car = new Model.Car();
public double Speed
{
get { return this.car.Speed; }
set { this.car.Speed = value; }
}
}
}
Since the model is big this involves in a lot of duplication. Maybe there is a better alternative?
Thanks