I'm doing a code first ASP .NET MVC project.
In my view, I'm taking in the entity.
@model MyProject.Model.MyEntity
Within the view I am rendering a partial view, passing in the model.
@Html.Partial("_Edit", Model)
In this partial view I have defined the model as an object.
@model object
When I display the model's type I get what appears to be a GUID appended to it.
@{
Type entityType = Model.GetType();
string singularName = entityType.Name;
}
@{ ViewBag.Title = "Edit an existing " + singularName; }
This is what I see on screen:
Edit an existing MyEntity_CB3FF0C41867D7757E4AF90F10EE2F7ED5B407EFCB96592EC3FB0A06DCAB902B
Anyone know why and is there a way around it other than doing a SubString()
on the underscore?