project, I get an error the problem is;
"The parameters dictionary contains a null entry for parameter 'Id' of non-nullable type 'System.Int32' for method 'Void Delete(Int32)' in 'BlogNewCMS.Controllers.HomeController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parametre adı: parameters"
Controller;
[HttpPost]
public void Delete(int Id)
{
using (var session = FluentNHibernateConnectingAdmin.OpenSession())
{
using (var transaction = session.BeginTransaction())
{
var article = session.QueryOver<Article>().Where(x => x.Id == 3).SingleOrDefault();
session.Delete(article);
transaction.Commit();
}
}
}
Page;
@foreach (var active in Model)
{
using (Html.BeginForm("Delete", "home", FormMethod.Post))
{
<tr role="row" class="gradeA odd">
<td class="sorting_1">@active.UserID</td>
<td>@active.Topic</td>
<td>@active.TopicDetail</td>
<td class="text-center">
<input type="submit" class="btn btn-danger" name="name" value="Sil" />
</td>
</tr>
}
}
Routing;
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);