File tree Expand file tree Collapse file tree 4 files changed +42
-2
lines changed
AspnetRunBasics/Repositories Expand file tree Collapse file tree 4 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
1
+ using AspnetRunBasics . Entities ;
2
+ using System . Threading . Tasks ;
3
+
4
+ namespace AspnetRunBasics . Repositories
5
+ {
6
+ public interface ICartRepository
7
+ {
8
+ Task < Cart > GetCartByUserName ( string userName ) ;
9
+ Task AddItem ( string userName , int productId ) ;
10
+ Task RemoveItem ( int cartId , int cartItemId ) ;
11
+ Task ClearCart ( string userName ) ;
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ using AspnetRunBasics . Entities ;
2
+ using System . Collections . Generic ;
3
+ using System . Threading . Tasks ;
4
+
5
+ namespace AspnetRunBasics . Repositories
6
+ {
7
+ public interface ICategoryRepository
8
+ {
9
+ Task < IEnumerable < Category > > GetCategories ( ) ;
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ using AspnetRunBasics . Entities ;
2
+ using System . Threading . Tasks ;
3
+
4
+ namespace AspnetRunBasics . Repositories
5
+ {
6
+ public interface IOrderRepository
7
+ {
8
+ Task < Order > CheckOut ( Order orderModel ) ;
9
+ }
10
+ }
Original file line number Diff line number Diff line change 1
- using System ;
1
+ using AspnetRunBasics . Entities ;
2
+ using System ;
2
3
using System . Collections . Generic ;
3
4
using System . Linq ;
4
5
using System . Threading . Tasks ;
5
6
6
7
namespace AspnetRunBasics . Repositories
7
8
{
8
- public class IProductRepository
9
+ public interface IProductRepository
9
10
{
11
+ Task < IEnumerable < Product > > GetProductListAsync ( ) ;
12
+ Task < Product > GetProductByIdAsync ( int id ) ;
13
+ Task < IEnumerable < Product > > GetProductByNameAsync ( string name ) ;
14
+ Task < IEnumerable < Product > > GetProductByCategoryAsync ( int categoryId ) ;
15
+ Task < IEnumerable < Category > > GetCategories ( ) ;
10
16
}
11
17
}
You can’t perform that action at this time.
0 commit comments