namespace RestUpdatingSample.Models
{
    using System;
    using System.Linq.Expressions;

    public class UserModel
    {
        public int Id { get; set; }

        public string Username { get; set; }

        public static Expression<Func<User, UserModel>> FromUser()
        {
            return u => new UserModel
            {
                Id = u.Id,
                Username = u.Username
            };
        }
    }
}