public CoachesGetResponse GetCoachSizes() { var response = new CoachesGetResponse(); var res = from c in _MongoContext.mTransportMaster.AsQueryable() select new { c.Brand, c.Coaches }; var result = from c in _MongoContext.mTransportCategory.AsQueryable() select c.CategoryName; foreach (var x in result) { response.CategoryName.Add(x); } foreach (var x in res) { foreach (var y in x.Brand) { response.BrandName.Add(Convert.ToString(y.BrandName)); } foreach (var y in x.Coaches) { response.CoachType.Add(Convert.ToString(y.Type)); } } return(response); }
public async Task <CoachesGetResponse> GetCoachTypesForTransport(string ticket) { CoachesGetResponse objCoachTypesResponse = new CoachesGetResponse(); objCoachTypesResponse = await serviceProxy.GetData(_configuration.GetValue <string>("ServiceMaster:GetCoachTypesForTransport"), typeof(CoachesGetResponse), ticket); return(objCoachTypesResponse); }