public EnglishAN08010Response(AN08010Response innerResponse) { OutputRecord = innerResponse.OutputRecord; if (innerResponse.OutputArrayRecord != null) { OutputArrayRecord = Array.ConvertAll <SVARPERSONER, ReplyPerson>(innerResponse.OutputArrayRecord, (p) => new ReplyPerson(p)); } }
public SchoolModel GetSchool(SVAR.Domain.Models.Organizations.School school) { return new SchoolModel { Id = school.Id, Name = school.Name, Url = _urlHelper.Link("schools", new {companyId = school.Company.Id, id=school.Id}), CompanyUrl = _urlHelper.Link("DefaultApi", new {controller="companies",id=school.Company.Id}) }; }
public CompanyModel GetCompany(SVAR.Domain.Models.Organizations.Company company) { return new CompanyModel { Id = company.Id, Name = company.Name, Url = _urlHelper.Link("DefaultApi", new { id = company.Id }), Schools = company.Schools == null ? null : company.Schools.ToList().Select(GetSchool) }; }