diff --git a/RepositoryPattern.sln b/RepositoryPattern.sln index 22a4e08..61fc2b8 100644 --- a/RepositoryPattern.sln +++ b/RepositoryPattern.sln @@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RepositoryPattern", "Reposi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockDomain", "StockDomain\StockDomain.csproj", "{25899D94-D35E-44A1-BDD7-BDD5589DB2E0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StockDal.Interface", "StockDal.Interface\StockDal.Interface.csproj", "{65F33E97-16CF-471A-9C59-D0D17287856C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {25899D94-D35E-44A1-BDD7-BDD5589DB2E0}.Debug|Any CPU.Build.0 = Debug|Any CPU {25899D94-D35E-44A1-BDD7-BDD5589DB2E0}.Release|Any CPU.ActiveCfg = Release|Any CPU {25899D94-D35E-44A1-BDD7-BDD5589DB2E0}.Release|Any CPU.Build.0 = Release|Any CPU + {65F33E97-16CF-471A-9C59-D0D17287856C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65F33E97-16CF-471A-9C59-D0D17287856C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65F33E97-16CF-471A-9C59-D0D17287856C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65F33E97-16CF-471A-9C59-D0D17287856C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/RepositoryPattern/Form1.cs b/RepositoryPattern/Form1.cs index d4e963e..d96b286 100644 --- a/RepositoryPattern/Form1.cs +++ b/RepositoryPattern/Form1.cs @@ -1,4 +1,5 @@ -using System; +using StockDal.Interface; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; diff --git a/RepositoryPattern/ProductRepository.cs b/RepositoryPattern/ProductRepository.cs index f7af3c0..9c1bdf5 100644 --- a/RepositoryPattern/ProductRepository.cs +++ b/RepositoryPattern/ProductRepository.cs @@ -6,6 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Dapper; +using StockDal.Interface; using StockDomain; namespace RepositoryPattern diff --git a/RepositoryPattern/Program.cs b/RepositoryPattern/Program.cs index 05e077f..e8cc362 100644 --- a/RepositoryPattern/Program.cs +++ b/RepositoryPattern/Program.cs @@ -1,4 +1,5 @@ using Autofac; +using StockDal.Interface; using System; using System.Collections.Generic; using System.Linq; diff --git a/RepositoryPattern/RepositoryPattern.csproj b/RepositoryPattern/RepositoryPattern.csproj index 029dc2f..69f5fd5 100644 --- a/RepositoryPattern/RepositoryPattern.csproj +++ b/RepositoryPattern/RepositoryPattern.csproj @@ -13,6 +13,7 @@ + diff --git a/RepositoryPattern/IProductRepository.cs b/StockDal.Interface/IProductRepository.cs similarity index 64% rename from RepositoryPattern/IProductRepository.cs rename to StockDal.Interface/IProductRepository.cs index 357cf9c..cb77664 100644 --- a/RepositoryPattern/IProductRepository.cs +++ b/StockDal.Interface/IProductRepository.cs @@ -1,17 +1,14 @@ using StockDomain; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace RepositoryPattern +namespace StockDal.Interface { public interface IProductRepository { IEnumerable GetProducts(); bool Insert(Product product); bool Update(Product product); - bool Delete(string productId); + bool Delete(string productId); } } diff --git a/StockDal.Interface/StockDal.Interface.csproj b/StockDal.Interface/StockDal.Interface.csproj new file mode 100644 index 0000000..41382c5 --- /dev/null +++ b/StockDal.Interface/StockDal.Interface.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp3.1 + + + + + + +