Re: How to convert Ienumerable to Icollection
Do you need to use SelectMany rather than Select?http://msdn.microsoft.com/en-us/library/bb534336.aspxSelectMany kind of flattens a sub-heirarchy of properties into a flat list of properties.
View ArticleRe: How to convert Ienumerable to Icollection
thanks for the reply, I need a collection of SDuser , not just a single SDUser. but th SDUser is not avilable without using .Select . so the below will not workSDUser= cd.SiteDefinitions.Select(p =>...
View ArticleRe: How to convert Ienumerable to Icollection
This lineSDUser = cd.SiteDefinitions.Select(p => p.UserSiteMappings.Select(p2 => p2.SDUser))Is returning an IEnumerable of an IEnumerable. Your inner Select is creating IEnumerable of wherever...
View ArticleRe: How to convert Ienumerable to Icollection
After changing the ICollection to IEnumerable i am getting new error:-Error 1 Cannot implicitly convert type...
View ArticleRe: How to convert Ienumerable to Icollection
AidyFTry SDUser = cd.SiteDefinitions.Select(p => p.UserSiteMappings.Select(p2 => p2.SDUser)).ToList()I already tried .Tolist() but nothing changed.
View ArticleRe: How to convert Ienumerable to Icollection
I am using ICollection , since all the model classes under the .tt template uses Icollectionswhen defining navigation properties.
View ArticleRe: How to convert Ienumerable to Icollection
Instead of trying to convert an IEnumerable to an ICollection, why are you using an ICollection? Can you just use an IEnumerable? Most of the time IEnumerable in a ViewModel works just fine.Change all...
View ArticleRe: How to convert Ienumerable to Icollection
TrySDUser = cd.SiteDefinitions.Select(p => p.UserSiteMappings.Select(p2 => p2.SDUser)).ToList()
View ArticleHow to convert Ienumerable to Icollection
I have the following viewModel class inside my asp.net mvc web application:-public class CustomerDetails { public AccountDefinition AccountDefinition {get; set;} public SDOrganization SDOrganization...
View Article
More Pages to Explore .....