User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
tengo una tabla llamada Technologys y cada Technology puede tener una o mas resolutions. Lo que quiero hacer es que se muestren todas las resoluciones que tiene una tecnologia en un mismo campo.
Ejemplo
Tabla de tecnologias
NombreDescripcionResoluciones1 prueba 140,33,32
Necesito hacerlo con linq y me han dicho que la clave esta en un String Join o en un Agregate usando dos querys pero no puedo conseguirlo.
Este es mi codigo:
varTechnology1=(from tTechnology inContext.Technologyjoin tUsers inContext.Users on tTechnology.EnableBy equals tUsers.UserIdinto collection
from subCase in collection.DefaultIfEmpty()join tUsers2 inContext.Users on tTechnology.LastChangeBy equals tUsers2.UserIdinto collection2
from subCase2 in collection2.DefaultIfEmpty()join tUsers3 inContext.Users on tTechnology.DisableBy equals tUsers3.UserIdinto collection3
from subCase3 in collection3.DefaultIfEmpty()join tResolution inContext.Resolution on tTechnology.TechnologyId equals tResolution.TechnologyIdinto collection4
from subCase4 in collection4.DefaultIfEmpty()where tTechnology.DisableDate==null//orderby selectnew{
tTechnologyTechnologyId = tTechnology.TechnologyId,
tTechnologyName = tTechnology.Name,
tTechnologyDescription = tTechnology.Description,
tCityName = tTechnology.City.Name,
tStateName = tTechnology.City.State.Name,
tCountryName = tTechnology.City.State.Country.Name,
tResolutions =(from tR inContext.Resolutionwhere tR.TechnologyId== tTechnology.TechnologyIdselect tR.Measure),
tEnableBy =(subCase.Name==null?null: subCase.Name)+""+(subCase.FirstLastName==null?null: subCase.FirstLastName)+" "+(subCase.SecondLastName==
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
3 years ago
tengo una tabla llamada Technologys y cada Technology puede tener una o mas resolutions. Lo que quiero hacer es que se muestren todas las resoluciones que tiene una tecnologia en un mismo campo.
Ejemplo
Necesito hacerlo con linq y me han dicho que la clave esta en un String Join o en un Agregate usando dos querys pero no puedo conseguirlo.
Este es mi codigo: