Open KrunchMuffin opened 5 years ago
Yeah, sorry. Unfortunately, there's no way to correct it: I'm told that the current version of Guides is "just a placeholder". Authors have no editing capability, so I can't correct the file name. My impression is that they're just keeping the articles around for the traffic. My future articles will be published at codeArbor.com, where that isn't a problem.
ok, no problem. Look forward to that as I have gone through so many and your is the only one I could follow. Would love to see the one I mentioned expanded. Trying to figure out how to do the Edit view.
Keep getting this error The model item passed into the dictionary is of type 'System.Data.Entity.DynamicProxies.profile_B335676325ED23BD377DEDF4F9141A632C4FEAEFAD1A809493349F081B8C428A', but this dictionary requires a model item of type 'S101Admin.ViewModels.ProfileEditViewModel'.
On Thu, Aug 9, 2018 at 11:45 AM AJ Saulsberry notifications@github.com wrote:
Yeah, sorry. Unfortunately, there's no way to correct it: I'm told that the current version of Guides is "just a placeholder". Authors have no editing capability, so I can't correct the file name. My impression is that they're just keeping the articles around for the traffic. My future articles will be published at codeArbor.com https://codearbor.com, where that isn't a problem.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ajsaulsberry/BlipDrop/issues/1#issuecomment-411803857, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_TjfZ9yz5zl2FiwMyp7GIzeaaMWDiYks5uPFkRgaJpZM4V09XY .
As you may have discovered by now, when you return to the view you have to do it with the model
that came as an argument to the HttpPost
action method, or a new instance of the view model. Whenever you see such an error, check to be sure you're using the correct view model--or if you're using a view model at all. While you can use an entity class, and that works fine for simple objects like validation data, you'll paint yourself into a corner if you try to do that for more complex objects. If all this sounds bewildering, I suggest investing the time in the PluralSight class(es) linked in the article, they provide a comprehensive introduction to MVC, EF, and MVVM.
Was working through your guide https://www.pluralsight.com/guides/asp-net-mvc-populating-dropdown-lists-in-razor-views-using-the-mvvm-design-pattern-entity-framework-and-ajax
and noticed this. As a beginner, I was a little confused til I looked at the source here.