ASP.net mvc EntityCollection is null when saving?

OK, After a lot of searching I finally found an answer for my problem I already made an extra property to make up for the EntityCollection but it looked like this: public IList ListReleaseDescription { get { return ReleaseDescription.ToList(); } } That didn't work so I made a simple property out of it like so: public IList ListReleaseDescription{get; set;} and I populated this property in my controller. This finally fixed my problem and I got all the data back when saving! I can't believe I wasted 1,5 days on this when the solution was this simple.

OK, After a lot of searching I finally found an answer for my problem. I already made an extra property to make up for the EntityCollection but it looked like this: public IList ListReleaseDescription { get { return ReleaseDescription.ToList(); } } That didn't work so I made a simple property out of it like so: public IList ListReleaseDescription{get; set;} and I populated this property in my controller. This finally fixed my problem and I got all the data back when saving!

I can't believe I wasted 1,5 days on this when the solution was this simple.

I have an asp.net MVC website which uses the entityframework for its datamodel. When looking for a solution for this problem on the web. I found out that using an EntityCollection (see list Release.

ReleaseDescription) is not a good idea so in the partial class Release I made an extra property ReleaseDescriptionList which transforms this entityCollection into a List through the getter, it has no setter. The problem is that, when saving, my release. ReleaseDescription or even the release.

ReleaseDescriptionList is always empty when items should be in it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions