Great. How to create the pagination version of stored procedure ?
@RoundTheCode10 ай бұрын
You can use OFFSET in newer versions of SQL Server. I would pass in the skip and take as parameters. Use the skip for the OFFSET and for the take, you can maybe use SELECT TOP @Take FROM... Haven't tried it though. Here is some info about OFFSET in SQL Server to help you. www.red-gate.com/simple-talk/databases/sql-server/t-sql-programming-sql-server/paging-data-in-t-sql/
@MykolaEp8 ай бұрын
How to pass parameters for query for operation WHERE StatusOfProduct IN ("InStock", "Ordered") and count of parameter are different for each request and comes from UI filter? First request ("InStock", "Ordered"), another request - ("InStock", "Ordered", "OutOfStock"), third ("Ordered").
@Tamer_Ali10 ай бұрын
Thanks a lot for the useful video Can we use DTO class instead of existing entity with FromSqlRaw ?
@RoundTheCode10 ай бұрын
I don't think that would work as the SQL statement is sent to the database for querying. A DTO won't have any direct relationship with the database, so that's where it won't work.