set variables in an MVC application?
- by Melissa
I am trying to learn about the Orchard MVC application. I see the following code but cannot understand what it is doing. Can someone explain what this:
User.As<UserPart>().Record.UserName = value;
means?
public class UserEditViewModel {
[Required]
public string UserName {
get { return User.As<UserPart>().Record.UserName; }
set { User.As<UserPart>().Record.UserName = value; }
}
[Required]
public string Email {
get { return User.As<UserPart>().Record.Email; }
set { User.As<UserPart>().Record.Email = value; }
}
public IContent User { get; set; }
}