You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have added the routing
[Route ("Customers/Details/{id}")]
public ActionResult Details(int id)
{
var customer = _context.Customers.SingleOrDefault(c =>c.Id == id);
if (customer == null)
return HttpNotFound();
else
return View(customer);
}
still it didnt work also i applied Route.MapRoute(
name: "Details",
url: "{Customers}/{Details}/{id}",
defaults: new { controller = "Customers", action = "Details", id = UrlParameter.Optional }
);
when im redirecting it http://localhost:50904/Customers/Details/1 it is giving me the error of Server Error in '/' Application.
The model item passed into the dictionary is of type 'Aura.Models.Customer', but this dictionary requires a model item of type 'Aura.ViewModels.RandomMovieViewModel'.
The text was updated successfully, but these errors were encountered:
The URL has been incorrectly defined. The controller and the action name shouldn't be in the curly bracket "Customers/Details/{id}". The entities that are variable-like parameters are inside curly brackets while the controller and action here are fixed in this case
The URL has been incorrectly defined. The controller and the action name shouldn't be in the curly bracket "Customers/Details/{id}". The entities that are variable-like parameters are inside curly brackets while the controller and action here are fixed in this case
i have added the routing
[Route ("Customers/Details/{id}")]
public ActionResult Details(int id)
{
var customer = _context.Customers.SingleOrDefault(c =>c.Id == id);
still it didnt work also i applied Route.MapRoute(
name: "Details",
url: "{Customers}/{Details}/{id}",
defaults: new { controller = "Customers", action = "Details", id = UrlParameter.Optional }
);
this also didnt worked it is giving the error of Server Error in '/' Application.
The resource cannot be found. and url is something like this http://localhost:50904/Customers/Details?Length=9
when im redirecting it http://localhost:50904/Customers/Details/1 it is giving me the error of Server Error in '/' Application.
The model item passed into the dictionary is of type 'Aura.Models.Customer', but this dictionary requires a model item of type 'Aura.ViewModels.RandomMovieViewModel'.
The text was updated successfully, but these errors were encountered: