Datatable editor class LeftJoin
Datatable editor class LeftJoin
I am trying to load few columns from first table and few from 2nd table using Left join. How do i achieve this?
I added needed columns to Join model and on the controller i had this:
new Editor(db, "AgencyLocation", pkey = "AgencyLocationId")
.Model<JoinModel>()
.Field(new Field("AgencyLocation.AgencyId").Options("Agency", "AgencyId", "OwnerName"))
.LeftJoin("Agency","Agency.AgencyId","=","AgencyLocation.AgencyId")
.Process(request)
.Data();
Please give me an example.