What template would I find the properties in?
Walaa wrote:
Yeah, you can modify the templates as you wish.
But just for curiosity, how would you populate an entity?
I would define the nessesary propertys and/or methods in a partial class with required scope. For the purpose of encapsaltion fields in the model should be controled via methods on the object. I also need to control the creation and removal of related entities
public class item
{
private EntityCollection<ActionEntity>Actions
{
get {value via llblgen method;}
set{set via llblgen method;}
}
public bool isArchived
{
get {value via llblgen method;}
private set{set via llblgen method;}
}
public IArchiveInfo
{
get {value via llblgen method;}
private set{set via llblgen method;}
}
public IArchiveInfo Archive()
{
if (!isArchived)
{
IArchiveInfo ai=(IArchiveInfo )new ArchiveEntity(context.user,DateTime.Now);
this.ArchiveInfo=ai;
this.Actions.add(new ActionEntity("Archive",context.user);
return ai
}
}
public IList<string> ActionEvents
{
return new List<string>(Helper.Convert(this.Actions);
}
}