Is there a difference in terms of security between these two models to be given to View? Ie. in the second example can a webuser/hacker access the methods in any way?
public class ObjectViewModel
{
public PropertyA {get;set;}
public PropertyB {get;set;}
public PropertyC {get;set;}
}
public class ObjectViewModel2
{
public PropertyA {get; private set;}
public PropertyB {get; private set;}
public PropertyC {get; private set;}
private void SetPropertyA()
{
...GetDataFromRepository();
}
private void SetPropertyB()
{
...GetDataFromRepository();
}
private void SetPropertyC()
{
...GetDataFromRepository();
}
}