Merhaba,
Resim yuklemek istediğimde bu hata ile karşılaşıyorum. Sorun nerede acaba?

"The model item passed into the ViewDataDictionary is of type 'BlogEntity.Concrete.Article', but this ViewDataDictionary instance requires a model item of type 'BlogUI.Areas.Admin.Models.ImageModel'."

Article Image icin Models uzerinde yeni Class oluşturmuştum. Kodun icerisinde var.

[CODE title="c#"]
Article Class =
public class Article


[Required(ErrorMessage ="Bu alan boş gecilmemeli.")]
[MinLength(3,ErrorMessage ="En az 2 karakter girilmeli.")]
[MaxLength(50,ErrorMessage ="En fazla 50 karakter girilmeli.")]
public string ArticleTitle

[MinLength(100, ErrorMessage = "En az 100 karakter girilmeli.")]
[Required(ErrorMessage = "Bu alan boş gecilmemeli.")]
public string ArticleContent
[NotMapped]
public string ArticleImage
public int ViewsCount
public int CommentCount
public DateTime ArticleCreatedDate
public bool ArticleStatus
public ICollection Comments
public int 931
public Category Category
public int Id
public User User
}

Models icindeki yeni resim class'ı =

public class ImageModel

public string ArticleContent
public IFormFile ArticleImage
public int 931
public Category Category
public DateTime ArticleCreatedDate

}

Controller tarafı =

[HttpGet]
public IActionResult ImageUpload()



[HttpPost]
public IActionResult ImageUpload(ImageModel p)

a.ArticleStatus = true;
a.ArticleTitle = p.ArticleTitle;
a.ArticleCreatedDate = p.ArticleCreatedDate;


am.Add(a);
return RedirectToAction("Index");
}

}


View tarafı =
@model BlogUI.Areas.Admin.Models.ImageModel
@




[h=2]Yeni Blog Ekle[/h]










[h=4]Blog Başlık[/h]
@html.TextBoxFor(x => x.ArticleTitle, new )
@html.ValidationMessageFor(x => x.ArticleTitle, "", new )




[h=4]Blog İcerik[/h]
@html.TextAreaFor(x => x.ArticleContent, 7, 3, new )
@html.ValidationMessageFor(x => x.ArticleContent, "", new )




[h=4]Blog Kategori[/h]
@html.DropDownListFor(x => x.931, (List)ViewBag.c, new )




[h=4]Blog Resmi[/h]




Blog Ekle














[/CODE]