Click here to Skip to main content
15,869,940 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how to use join in domain service class and access it in application using mvvm pattern

1.I am writting customized query of type IQuerable in domain service class as
Public Function GetTbl_citybyId(i As Integer) As IQueryable
Return (From s In ObjectContext.tbl_city Join c In ObjectContext.tblCountries On s.Countryid Equals c.Countryid Where s.city_id = i)
End Function

2.now for fetching this method i write code in viewmodel as ,
Dim obj_datacontext As New DomainService1
Dim obj_city As New tbl_city
Dim city_info = obj_ds.GetTbl_citybyIdQuery(getcityid)
obj_ds.Load(city_info, AddressOf displayData, Nothing)

Now in this code obj_ds.GetTbl_citybyIdQuery(getcityid)gives an error as " GetTbl_citybyIdQueryis not memeber of domain service class even though it is available in domain service

please give me solution for this problem
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900