dimanche 28 juin 2015

ASP MVC Upload Profile Picture Model Class

Hi there Im new with this ASP MVC5 with EF6. Currently I am working on a project that requires to save profile picture of a user. My model class is

    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int ID { get; set; }

    [Required]
    public String Email { get; set; }

    [Required]
    public String Password { get; set; }

    public String FirstName { get; set; }

    [Required]
    public String LastName { get; set; }

I am not sure how to add profile picture attribute here. The controller class and view is generated automatically by VS.

Update: I am thinking to save the profile picture in "physical files" instead of saving the "picture data" on database.

Aucun commentaire:

Enregistrer un commentaire