set variables in an MVC application?

Posted by Melissa on Stack Overflow See other posts from Stack Overflow or by Melissa
Published on 2011-11-20T17:30:18Z Indexed on 2011/11/20 17:50 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

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; }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc