C# introduction to SQL
Here's what you'll need to do for this Kata:
Clone this repo to your machine, then create a branch to accomplish your work (git checkout -b your-branch-name
)
Navigate to the ProductRepository.cs
and properly implement/complete all methods using raw SQL. When done, the ProductRepository
class should be able to:
SELECT
all productsDELETE
a product with a particularProductId
UPDATE
a product's name with a particularProductId
INSERT
a new product
Add a class called DapperProductRepository
and enable the same methods implemented in the ProductRepository
class, but avoid raw SQL in favor of Dapper. Make sure you implement:
SELECT
all productsDELETE
a product with a particularProductId
UPDATE
a product's name with a particularProductId
INSERT
a new product
At this point, you have both DapperProductRepository
and ProductRepository
implementing the same methods. Make an Interface called IProductRepository
that both your classes can conform to:
- Add a method called
GetProductsWithReview
that performs anINNER JOIN
- Add a method called
GetProductsAndReviews
that performs aLEFT JOIN
Push your changes (git push
), create a pull request, and add request a review from your instructor.
Good luck!