Using Stored Procedures with filtering and sorting

Posts   
 
    
Mahdi
User
Posts: 1
Joined: 14-Dec-2017
# Posted on: 14-Dec-2017 18:28:46   

Hi, we want use LLBLGen in our project that developed with EF, but we have wonder about Stored Procedures usage in LLBLGen, because we have a lot of SP (really we used only SP sunglasses ). We need quick way to use LLBLGen and remove EF for below samples:

1) Proc_sp_select_tblComplaintByUser(username).OrderByDescending(o => o.createDatetime);

2) Proc_sp_select_tblComplaintDetail(lic.complaintFullID).Select(s => s.orgName);

3) Proc_sp_select_tblComplaintByCom(lic.complaintFullID).Max(m => m.complaintId);

4) Proc_sp_select_tblUserPersonnel(username).Single();

5) Proc_sp_select_tblOrganizationAll().Where(w => w.oganizationType.Equals("EXE"));

Also how can we filter result of SP?

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 14-Dec-2017 22:08:26   

You can map these SPs to TypedViews. Please check the documentation here

How to add them in the designer: https://www.llblgen.com/Documentation/5.3/Designer/How%20To/AddEditTypedView.htm

Then you can filter and sort the resultSet as you want.