{"action":"opened","issue":{"url":"https://api.github.com/repos/ahmedahamid/temp-third/issues/457","repository_url":"https://api.github.com/repos/ahmedahamid/temp-third","labels_url":"https://api.github.com/repos/ahmedahamid/temp-third/issues/457/labels{/name}","comments_url":"https://api.github.com/repos/ahmedahamid/temp-third/issues/457/comments","events_url":"https://api.github.com/repos/ahmedahamid/temp-third/issues/457/events","html_url":"https://github.com/ahmedahamid/temp-third/issues/457","id":268934981,"number":457,"title":"Help me to solve: Server Error in '/' Application.","user":{"login":"ahmedahamid","id":10718804,"avatar_url":"https://avatars3.githubusercontent.com/u/10718804?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmedahamid","html_url":"https://github.com/ahmedahamid","followers_url":"https://api.github.com/users/ahmedahamid/followers","following_url":"https://api.github.com/users/ahmedahamid/following{/other_user}","gists_url":"https://api.github.com/users/ahmedahamid/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmedahamid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmedahamid/subscriptions","organizations_url":"https://api.github.com/users/ahmedahamid/orgs","repos_url":"https://api.github.com/users/ahmedahamid/repos","events_url":"https://api.github.com/users/ahmedahamid/events{/privacy}","received_events_url":"https://api.github.com/users/ahmedahamid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-26T22:43:58Z","updated_at":"2017-10-26T22:43:58Z","closed_at":null,"author_association":"OWNER","body":"As I tried to execute that \"MvcMusicStore-V3.0\" Tutorial but after that using SQL CE got an error as follow.\nNOTE: instead of Genre class i used that as Gener.ok?\nkeep in mind.\nError:\nOne or more validation errors were detected during model generation:\n \nSystem.Data.Edm.EdmEntityType: : EntityType 'Gener' has no key defined. Define the key for this EntityType.\nSystem.Data.Edm.EdmEntitySet: EntityType: EntitySet �Genres� is based on type �Gener� that has no keys defined.\n \nDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. \n \nException Details: System.Data.Entity.ModelConfiguration.ModelValidationException: One or more validation errors were detected during model generation:\n \nSystem.Data.Edm.EdmEntityType: : EntityType 'Gener' has no key defined. Define the key for this EntityType.\nSystem.Data.Edm.EdmEntitySet: EntityType: EntitySet �Genres� is based on type �Gener� that has no keys defined.\n \n \nSource Error: \n \n \nLine 16:         public ActionResult Index()\nLine 17:         {\nLine 18:             var genres = storeDB.Genres.ToList();\nLine 19:             return View(genres);\nLine 20:         }\n \n \nSource File: D:\\MusicStore\\MusicStore\\Controllers\\StoreController.cs    Line: 18 \n \nStack Trace: \n \n \n[ModelValidationException: One or more validation errors were detected during model generation:\n \nSystem.Data.Edm.EdmEntityType: : EntityType 'Gener' has no key defined. Define the key for this EntityType.\nSystem.Data.Edm.EdmEntitySet: EntityType: EntitySet �Genres� is based on type �Gener� that has no keys defined.\n\n]\n   System.Data.Entity.ModelConfiguration.Edm.EdmModelExtensions.ValidateAndSerializeCsdl(EdmModel model, XmlWriter writer) +103\n   System.Data.Entity.ModelConfiguration.Edm.EdmModelExtensions.ValidateCsdl(EdmModel model) +54\n   System.Data.Entity.DbModelBuilder.Build(DbProviderManifest providerManifest, DbProviderInfo providerInfo) +176\n   System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +271\n   System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +65\n   System.Data.Entity.Internal.RetryLazy2.GetValue(TInput input) +175   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +449   System.Data.Entity.Internal.InternalContext.Initialize() +30   System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +34   System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +148\n   System.Data.Entity.Internal.Linq.InternalSet1.GetEnumerator() +33   System.Data.Entity.Infrastructure.DbQuery1.System.Collections.Generic.IEnumerable<TResult>.GetEnumerator() +91\n   System.Collections.Generic.List1..ctor(IEnumerable1 collection) +315\n   System.Linq.Enumerable.ToList(IEnumerable1 source) +58   MusicStore.Controllers.StoreController.Index() in C:\\kapil_M\\MVC\\MusicStore\\MusicStore\\Controllers\\StoreController.cs:18   lambda_method(Closure , ControllerBase , Object[] ) +96   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +17   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +208\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +55   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) +263\n   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19\n   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters) +191\n   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343\n   System.Web.Mvc.Controller.ExecuteCore() +116\n   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97\n   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10\n   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37\n   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21\n   System.Web.Mvc.Async.<>c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +12   System.Web.Mvc.Async.WrappedAsyncResult1.End() +62\n   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50\n   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7\n   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22\n   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60\n   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9\n   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8897857\n   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184\n \n \n \n \nVersion Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1\n \nMy Album class is as:\n public class Album\n{\n    public int AlbumId { get; set; } \n    public int GenreId { get; set; } \n    public int ArtistId { get; set; }\n    public string Title { get; set; } \n    public decimal Price { get; set; } \n    public string AlbumArtUrl { get; set; }\n    public Gener Gener { get; set; } \n    public Artist Artist { get; set; }\n}\n\n \n \nif possible please help me to solve it.I am looking streight forward for intimation from your side.\nHope you can..\n\r\n\r\n#### This work item was migrated from CodePlex\r\nCodePlex work item ID: '9889'\r\nVote count: '1'\r\n"}}
{"actor":{"display_login":"ahmedahamid"}}