using WF_WebAdmin.Model;

namespace WF_WebAdmin.Converter
{
    public class UserExtension
    {
        public User UserToDTO(UserDTO u)
        {
            User user = new User(u.Image, u.Name, u.Email, u.DateCreation,u.IsAdmin);
            return user;
        }

        public UserDTO DTOToUser(User u)
        {
            UserDTO user = new UserDTO(u.Image, u.Name, u.Email, u.DateCreation);
            return user;
        }
    }
}
