<p>Hello,</p>
<p>J'ai besoin de transférer 2 images dans 2 différents chemins mais pour le même document, et je ne sais pas comment y procéder vu que je viens de débuter en ASP.NET MVC & EF6</p>
<p>In the picture below my form</p>
<p><img src="https://i.imgur.com/G3zwWm1.png" width="643" height="409" alt=""></p>
<p>And this is the overview I need to get</p>
<p><img src="https://i.imgur.com/VRXZWw7.png" alt="" width="621" height="429"></p>
<p>The code of my class Document.cs</p>
<pre class="prettyprint lang-auto">using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ApplicationTest.Models
{
[Table("Document")]
public class Document
{
[Key]
public int IdDoc { get; set; }
public string Titre { get; set; }
public string Description { get; set; }
<span style="background-color:#ffff00"> public virtual string Image { get; set; }
public virtual string Pdf { get; set; }</span>
public int IdType { get; set; }
[ForeignKey("IdType")]
public virtual Type Type { get; set; }
}
}</pre>
<p>The input part of my Create.cshtml view<br>
<br>
</p>
<pre class="prettyprint lang-auto"><div class="form-group">
@Html.LabelFor(model => model.Image, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<input type="file" class="form-control" name="file" accept="image/png,image/jpg,image/jpeg" />
@Html.ValidationMessageFor(model => model.Image, "", new { @class = "text-danger" })
</div>
</div>