RepositoryModel implemented
This commit is contained in:
19
H_PLUS_Sports/Contracts/ICustomerRepository.cs
Normal file
19
H_PLUS_Sports/Contracts/ICustomerRepository.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using H_Plus_Sports.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace H_Plus_Sports.Contracts
|
||||
{
|
||||
public interface ICustomerRepository
|
||||
{
|
||||
Task<Customer> Add(Customer customer);
|
||||
IEnumerable<Customer> GetAll();
|
||||
Task<Customer> Find(int id);
|
||||
Task<Customer> Update(Customer customer);
|
||||
Task<Customer> Remove(int id);
|
||||
Task<bool> Exist(int id);
|
||||
|
||||
}
|
||||
}
|
||||
21
H_PLUS_Sports/Contracts/IOrderItemRepository.cs
Normal file
21
H_PLUS_Sports/Contracts/IOrderItemRepository.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using H_Plus_Sports.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace H_Plus_Sports.Contracts
|
||||
{
|
||||
public interface IOrderItemRepository
|
||||
{
|
||||
Task<OrderItem> Add(OrderItem item);
|
||||
|
||||
IEnumerable<OrderItem> GetAll();
|
||||
|
||||
Task<OrderItem> Find(int id);
|
||||
|
||||
Task<OrderItem> Remove(int id);
|
||||
|
||||
Task<OrderItem> Update(OrderItem item);
|
||||
|
||||
Task<bool> Exists(int id);
|
||||
}
|
||||
}
|
||||
21
H_PLUS_Sports/Contracts/IOrderRepository.cs
Normal file
21
H_PLUS_Sports/Contracts/IOrderRepository.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using H_Plus_Sports.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace H_Plus_Sports.Contracts
|
||||
{
|
||||
public interface IOrderRepository
|
||||
{
|
||||
Task<Order> Add(Order item);
|
||||
|
||||
IEnumerable<Order> GetAll();
|
||||
|
||||
Task<Order> Find(int id);
|
||||
|
||||
Task<Order> Remove(int id);
|
||||
|
||||
Task<Order> Update(Order item);
|
||||
|
||||
Task<bool> Exists(int id);
|
||||
}
|
||||
}
|
||||
21
H_PLUS_Sports/Contracts/IProductRepository.cs
Normal file
21
H_PLUS_Sports/Contracts/IProductRepository.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using H_Plus_Sports.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace H_Plus_Sports.Contracts
|
||||
{
|
||||
public interface IProductRepository
|
||||
{
|
||||
Task<Product> Add(Product item);
|
||||
|
||||
IEnumerable<Product> GetAll();
|
||||
|
||||
Task<Product> Find(string id);
|
||||
|
||||
Task<Product> Remove(string id);
|
||||
|
||||
Task<Product> Update(Product item);
|
||||
|
||||
Task<bool> Exists(string id);
|
||||
}
|
||||
}
|
||||
21
H_PLUS_Sports/Contracts/ISalespersonRepository.cs
Normal file
21
H_PLUS_Sports/Contracts/ISalespersonRepository.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using H_Plus_Sports.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace H_Plus_Sports.Contracts
|
||||
{
|
||||
public interface ISalespersonRepository
|
||||
{
|
||||
Task<Salesperson> Add(Salesperson item);
|
||||
|
||||
IEnumerable<Salesperson> GetAll();
|
||||
|
||||
Task<Salesperson> Find(int id);
|
||||
|
||||
Task<Salesperson> Remove(int id);
|
||||
|
||||
Task<Salesperson> Update(Salesperson item);
|
||||
|
||||
Task<bool> Exists(int id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user