tmp = matrixTemplateViewModel.TemplateValues.Where(x=>x.AtnameId!=matrixTemplate.PrimAxis); > >matrixTemplateViewModel.ColumnAttributeId = tmp.Select(x => new { x.AtnameId }).Distinct().FirstOrDefault();In compile time I get 'Cannot implicitly convert type < anonymous type: int AtnameId to int > ' on the second line.