diff --git a/src/Directory.Build.props b/src/Directory.Build.props index bb46b071f..0378315f5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -112,7 +112,7 @@ --> - + diff --git a/src/Simple.OData.Client.sln b/src/Simple.OData.Client.sln index e1e65b024..608489582 100644 --- a/src/Simple.OData.Client.sln +++ b/src/Simple.OData.Client.sln @@ -16,10 +16,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Shared.N EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Client.Core", "Simple.OData.Client.Core\Simple.OData.Client.Core.csproj", "{361868B8-A63E-4C74-AA87-B70E1AB22313}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Shared.NorthwindService", "Simple.OData.Tests.Shared.NorthwindService\Simple.OData.Tests.Shared.NorthwindService.csproj", "{14436AD5-8995-406A-8468-F0B4DE53DFDB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Shared.ProductService", "Simple.OData.Tests.Shared.ProductService\Simple.OData.Tests.Shared.ProductService.csproj", "{276DF698-6E22-4FF2-BAF1-09BCE205CCE5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Client.Integration", "Simple.OData.Tests.Client.Integration\Simple.OData.Tests.Client.Integration.csproj", "{812D678E-B428-41A1-BC05-8160695AD186}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Client.V3.Adapter", "Simple.OData.Client.V3.Adapter\Simple.OData.Client.V3.Adapter.csproj", "{A08B2D3D-91A6-4ECD-B7AF-5977E840E383}" @@ -34,8 +30,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Samples.ApiV3" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Samples.ApiV3", "Simple.OData.Tests.Samples.ApiV3\Simple.OData.Tests.Samples.ApiV3.csproj", "{57AA878B-3DD3-4B79-AB0B-ECC29563AAAC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Shared.ActionProvider", "Simple.OData.Tests.Shared.ActionProvider\Simple.OData.Tests.Shared.ActionProvider.csproj", "{6BE6677A-761E-4278-9059-233D775FE347}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Client", "Simple.OData.Tests.Client\Simple.OData.Tests.Client.csproj", "{10A14EE1-39A6-4AE2-9A30-3B5573317E2C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Benchmarks.Client", "Simple.OData.Benchmarks.Client\Simple.OData.Benchmarks.Client.csproj", "{6E44E884-4949-4330-98B8-A919F814123E}" @@ -56,6 +50,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build & Release", "Build & EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{4C62DF5F-90DA-4D65-B13D-71FCDB4E92BC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Simple.OData.Tests.Shared.ActionProvider", "Simple.OData.Tests.Shared.ActionProvider\Simple.OData.Tests.Shared.ActionProvider.csproj", "{24BDBA9B-5BC4-4BC3-8F2D-9182795319E6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -70,14 +66,6 @@ Global {361868B8-A63E-4C74-AA87-B70E1AB22313}.Debug|Any CPU.Build.0 = Debug|Any CPU {361868B8-A63E-4C74-AA87-B70E1AB22313}.Release|Any CPU.ActiveCfg = Release|Any CPU {361868B8-A63E-4C74-AA87-B70E1AB22313}.Release|Any CPU.Build.0 = Release|Any CPU - {14436AD5-8995-406A-8468-F0B4DE53DFDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {14436AD5-8995-406A-8468-F0B4DE53DFDB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {14436AD5-8995-406A-8468-F0B4DE53DFDB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {14436AD5-8995-406A-8468-F0B4DE53DFDB}.Release|Any CPU.Build.0 = Release|Any CPU - {276DF698-6E22-4FF2-BAF1-09BCE205CCE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {276DF698-6E22-4FF2-BAF1-09BCE205CCE5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {276DF698-6E22-4FF2-BAF1-09BCE205CCE5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {276DF698-6E22-4FF2-BAF1-09BCE205CCE5}.Release|Any CPU.Build.0 = Release|Any CPU {812D678E-B428-41A1-BC05-8160695AD186}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {812D678E-B428-41A1-BC05-8160695AD186}.Debug|Any CPU.Build.0 = Debug|Any CPU {812D678E-B428-41A1-BC05-8160695AD186}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -106,10 +94,6 @@ Global {57AA878B-3DD3-4B79-AB0B-ECC29563AAAC}.Debug|Any CPU.Build.0 = Debug|Any CPU {57AA878B-3DD3-4B79-AB0B-ECC29563AAAC}.Release|Any CPU.ActiveCfg = Release|Any CPU {57AA878B-3DD3-4B79-AB0B-ECC29563AAAC}.Release|Any CPU.Build.0 = Release|Any CPU - {6BE6677A-761E-4278-9059-233D775FE347}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6BE6677A-761E-4278-9059-233D775FE347}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6BE6677A-761E-4278-9059-233D775FE347}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6BE6677A-761E-4278-9059-233D775FE347}.Release|Any CPU.Build.0 = Release|Any CPU {10A14EE1-39A6-4AE2-9A30-3B5573317E2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {10A14EE1-39A6-4AE2-9A30-3B5573317E2C}.Debug|Any CPU.Build.0 = Debug|Any CPU {10A14EE1-39A6-4AE2-9A30-3B5573317E2C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -122,6 +106,10 @@ Global {23EDE608-E77D-4336-9EFC-A4D1B0D94A94}.Debug|Any CPU.Build.0 = Debug|Any CPU {23EDE608-E77D-4336-9EFC-A4D1B0D94A94}.Release|Any CPU.ActiveCfg = Release|Any CPU {23EDE608-E77D-4336-9EFC-A4D1B0D94A94}.Release|Any CPU.Build.0 = Release|Any CPU + {24BDBA9B-5BC4-4BC3-8F2D-9182795319E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {24BDBA9B-5BC4-4BC3-8F2D-9182795319E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {24BDBA9B-5BC4-4BC3-8F2D-9182795319E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {24BDBA9B-5BC4-4BC3-8F2D-9182795319E6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -129,8 +117,6 @@ Global GlobalSection(NestedProjects) = preSolution {2A909E4D-6493-4D36-9FDE-786B89F9A387} = {4C62DF5F-90DA-4D65-B13D-71FCDB4E92BC} {361868B8-A63E-4C74-AA87-B70E1AB22313} = {A1B189A0-8C64-4F23-A8FC-9DDD79B8AF36} - {14436AD5-8995-406A-8468-F0B4DE53DFDB} = {4C62DF5F-90DA-4D65-B13D-71FCDB4E92BC} - {276DF698-6E22-4FF2-BAF1-09BCE205CCE5} = {4C62DF5F-90DA-4D65-B13D-71FCDB4E92BC} {812D678E-B428-41A1-BC05-8160695AD186} = {78D04AF9-B9B4-4025-93C6-B3DB01EDAAE9} {A08B2D3D-91A6-4ECD-B7AF-5977E840E383} = {A1B189A0-8C64-4F23-A8FC-9DDD79B8AF36} {31D1CC1D-316E-4516-A2BD-F07423B394F6} = {A1B189A0-8C64-4F23-A8FC-9DDD79B8AF36} @@ -138,11 +124,11 @@ Global {F01F7750-85F6-43D8-9C7B-34C75A3861E7} = {78D04AF9-B9B4-4025-93C6-B3DB01EDAAE9} {09CD2CB4-0B5B-4018-BFBB-7367CA7E10A4} = {6173C837-D890-4BF8-84F0-D8525997C52F} {57AA878B-3DD3-4B79-AB0B-ECC29563AAAC} = {78D04AF9-B9B4-4025-93C6-B3DB01EDAAE9} - {6BE6677A-761E-4278-9059-233D775FE347} = {4C62DF5F-90DA-4D65-B13D-71FCDB4E92BC} {10A14EE1-39A6-4AE2-9A30-3B5573317E2C} = {78D04AF9-B9B4-4025-93C6-B3DB01EDAAE9} {6E44E884-4949-4330-98B8-A919F814123E} = {78D04AF9-B9B4-4025-93C6-B3DB01EDAAE9} {23EDE608-E77D-4336-9EFC-A4D1B0D94A94} = {A1B189A0-8C64-4F23-A8FC-9DDD79B8AF36} {4C62DF5F-90DA-4D65-B13D-71FCDB4E92BC} = {78D04AF9-B9B4-4025-93C6-B3DB01EDAAE9} + {24BDBA9B-5BC4-4BC3-8F2D-9182795319E6} = {4C62DF5F-90DA-4D65-B13D-71FCDB4E92BC} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {EB40442F-5889-4697-BEA4-39E42E12EBCB} diff --git a/src/Simple.OData.Tests.Shared.NorthwindModel/Simple.OData.Tests.Shared.NorthwindModel.csproj b/src/Simple.OData.Tests.Shared.NorthwindModel/Simple.OData.Tests.Shared.NorthwindModel.csproj index 675947b02..727b2d3c1 100644 --- a/src/Simple.OData.Tests.Shared.NorthwindModel/Simple.OData.Tests.Shared.NorthwindModel.csproj +++ b/src/Simple.OData.Tests.Shared.NorthwindModel/Simple.OData.Tests.Shared.NorthwindModel.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/Simple.OData.Tests.Shared.NorthwindService/Northwind.svc b/src/Simple.OData.Tests.Shared.NorthwindService/Northwind.svc deleted file mode 100644 index 75705f2c1..000000000 --- a/src/Simple.OData.Tests.Shared.NorthwindService/Northwind.svc +++ /dev/null @@ -1,3 +0,0 @@ - - -<%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory, Microsoft.Data.Services, Version=5.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Service="Simple.OData.Tests.Shared.NorthwindModel.NorthwindService" %> diff --git a/src/Simple.OData.Tests.Shared.NorthwindService/Simple.OData.Tests.Shared.NorthwindService.csproj b/src/Simple.OData.Tests.Shared.NorthwindService/Simple.OData.Tests.Shared.NorthwindService.csproj deleted file mode 100644 index 062a9fef8..000000000 --- a/src/Simple.OData.Tests.Shared.NorthwindService/Simple.OData.Tests.Shared.NorthwindService.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - net8.0 - $(DocumentationFile)\$(AssemblyName).xml - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.NorthwindService/Web.Debug.config b/src/Simple.OData.Tests.Shared.NorthwindService/Web.Debug.config deleted file mode 100644 index 2e302f9f9..000000000 --- a/src/Simple.OData.Tests.Shared.NorthwindService/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.NorthwindService/Web.Release.config b/src/Simple.OData.Tests.Shared.NorthwindService/Web.Release.config deleted file mode 100644 index ec4d59cf7..000000000 --- a/src/Simple.OData.Tests.Shared.NorthwindService/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.NorthwindService/Web.config b/src/Simple.OData.Tests.Shared.NorthwindService/Web.config deleted file mode 100644 index efe71f472..000000000 --- a/src/Simple.OData.Tests.Shared.NorthwindService/Web.config +++ /dev/null @@ -1,83 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.NorthwindService/packages.config b/src/Simple.OData.Tests.Shared.NorthwindService/packages.config deleted file mode 100644 index d3ed75880..000000000 --- a/src/Simple.OData.Tests.Shared.NorthwindService/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.ProductService/App_Data/ProductServiceContext-20140116193513.mdf b/src/Simple.OData.Tests.Shared.ProductService/App_Data/ProductServiceContext-20140116193513.mdf deleted file mode 100644 index 331ddb498..000000000 Binary files a/src/Simple.OData.Tests.Shared.ProductService/App_Data/ProductServiceContext-20140116193513.mdf and /dev/null differ diff --git a/src/Simple.OData.Tests.Shared.ProductService/App_Start/WebApiConfig.cs b/src/Simple.OData.Tests.Shared.ProductService/App_Start/WebApiConfig.cs deleted file mode 100644 index c713ee070..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/App_Start/WebApiConfig.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Web.Http; -using System.Web.Http.OData.Builder; -using System.Web.Http.OData.Extensions; -using Simple.OData.Tests.Shared.ProductService.Models; - -namespace Simple.OData.Tests.Shared.ProductService.App_Start; - -public static class WebApiConfig -{ - public static void Register(HttpConfiguration config) - { - var builder = new ODataConventionModelBuilder(); - builder.EntitySet("Products"); - builder.EntitySet("WorkTaskModels"); - builder.EntitySet("WorkTaskAttachmentModels"); - builder.EntitySet("WorkActivityReportModels"); - var model = builder.GetEdmModel(); - - config.Routes.MapODataServiceRoute("odata", "odata/open", model); - config.Routes.MapODataServiceRoute("odatas", "odata/secure", model); - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Authentication/BasicAuthenticationConfigurationSection.cs b/src/Simple.OData.Tests.Shared.ProductService/Authentication/BasicAuthenticationConfigurationSection.cs deleted file mode 100644 index c51bf44ce..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Authentication/BasicAuthenticationConfigurationSection.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Configuration; - -namespace Devbridge.BasicAuthentication.Configuration; - -public class BasicAuthenticationConfigurationSection : ConfigurationSection -{ - private const string CredentialsNode = "credentials"; - - /// - /// Gets or sets the credentials. - /// - /// - /// The credentials. - /// - [ConfigurationProperty(CredentialsNode, IsRequired = false)] - public CredentialElementCollection Credentials - { - get => (CredentialElementCollection)this[CredentialsNode]; - set => this[CredentialsNode] = value; - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Authentication/BasicAuthenticationModule.cs b/src/Simple.OData.Tests.Shared.ProductService/Authentication/BasicAuthenticationModule.cs deleted file mode 100644 index 75b33a39a..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Authentication/BasicAuthenticationModule.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System.Text; -using System.Web; - -namespace Devbridge.BasicAuthentication; - -/// -/// This module performs basic authentication. -/// For details on basic authentication see RFC 2617. -/// Based on the work by Mike Volodarsky (www.iis.net/learn/develop/runtime-extensibility/developing-a-module-using-net) -/// -/// The basic operational flow is: -/// -/// On AuthenticateRequest: -/// extract the basic authentication credentials -/// verify the credentials -/// if successful, create and send authentication cookie -/// -/// On SendResponseHeaders: -/// if there is no authentication cookie in request, clear response, add unauthorized status code (401) and -/// add the basic authentication challenge to trigger basic authentication. -/// -public class BasicAuthenticationModule : IHttpModule -{ - /// - /// HTTP1.1 Authorization header - /// - public const string HttpAuthorizationHeader = "Authorization"; - - /// - /// HTTP1.1 Basic Challenge Scheme Name - /// - public const string HttpBasicSchemeName = "Basic"; // - - /// - /// HTTP1.1 Credential username and password separator - /// - public const char HttpCredentialSeparator = ':'; - - /// - /// HTTP1.1 Not authorized response status code - /// - public const int HttpNotAuthorizedStatusCode = 401; - - /// - /// HTTP1.1 Basic Challenge Scheme Name - /// - public const string HttpWwwAuthenticateHeader = "WWW-Authenticate"; - - /// - /// The name of cookie that is sent to client - /// - public const string AuthenticationCookieName = "BasicAuthentication"; - - /// - /// HTTP.1.1 Basic Challenge Realm - /// - public const string Realm = "ODataIntegration"; - - private IDictionary activeUsers; - - public void AuthenticateUser(object source, EventArgs e) - { - var context = ((HttpApplication)source).Context; - - var authorizationHeader = context.Request.Headers[HttpAuthorizationHeader]; - - // Extract the basic authentication credentials from the request - string? userName = null; - string? password = null; - if (!ExtractBasicCredentials(authorizationHeader, ref userName, ref password)) - { - return; - } - - // Validate the user credentials - if (!ValidateCredentials(userName, password)) - { - return; - } - - // check whether cookie is set and send it to client if needed - var authCookie = context.Request.Cookies.Get(AuthenticationCookieName); - if (authCookie is null) - { - authCookie = new HttpCookie(AuthenticationCookieName, "1") { Expires = DateTime.Now.AddHours(1) }; - context.Response.Cookies.Add(authCookie); - } - } - - public void IssueAuthenticationChallenge(object source, EventArgs e) - { - var context = ((HttpApplication)source).Context; - if (!context.Request.Path.Contains("/secure")) - { - return; - } - - var authorizationHeader = context.Request.Headers[HttpAuthorizationHeader]; - - string? userName = null; - string? password = null; - if (ExtractBasicCredentials(authorizationHeader, ref userName, ref password) && - ValidateCredentials(userName, password)) - { - return; - } - - // if authentication cookie is not set issue a basic challenge - var authCookie = context.Request.Cookies.Get(AuthenticationCookieName); - if (authCookie is null) - { - //make sure that user is not authenticated yet - if (!context.Response.Cookies.AllKeys.Contains(AuthenticationCookieName)) - { - context.Response.Clear(); - context.Response.StatusCode = HttpNotAuthorizedStatusCode; - context.Response.AddHeader(HttpWwwAuthenticateHeader, "Basic realm =\"" + Realm + "\""); - } - } - } - - protected virtual bool ValidateCredentials(string userName, string password) - { - if (activeUsers.ContainsKey(userName) && activeUsers[userName] == password) - { - return true; - } - - return false; - } - - protected virtual bool ExtractBasicCredentials(string authorizationHeader, ref string? username, ref string? password) - { - if (string.IsNullOrEmpty(authorizationHeader)) - { - return false; - } - - var verifiedAuthorizationHeader = authorizationHeader.Trim(); - if (verifiedAuthorizationHeader.IndexOf(HttpBasicSchemeName, StringComparison.InvariantCultureIgnoreCase) != 0) - { - return false; - } - - // get the credential payload - verifiedAuthorizationHeader = verifiedAuthorizationHeader.Substring(HttpBasicSchemeName.Length, verifiedAuthorizationHeader.Length - HttpBasicSchemeName.Length).Trim(); - // decode the base 64 encoded credential payload - var credentialBase64DecodedArray = Convert.FromBase64String(verifiedAuthorizationHeader); - var decodedAuthorizationHeader = Encoding.UTF8.GetString(credentialBase64DecodedArray, 0, credentialBase64DecodedArray.Length); - - // get the username, password, and realm - var separatorPosition = decodedAuthorizationHeader.IndexOf(HttpCredentialSeparator); - - if (separatorPosition <= 0) - { - return false; - } - - username = decodedAuthorizationHeader.Substring(0, separatorPosition).Trim(); - password = decodedAuthorizationHeader.Substring(separatorPosition + 1, (decodedAuthorizationHeader.Length - separatorPosition - 1)).Trim(); - - if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password)) - { - return false; - } - - return true; - } - - public void Init(HttpApplication context) - { - var config = System.Configuration.ConfigurationManager.GetSection("basicAuth"); - var basicAuth = (Configuration.BasicAuthenticationConfigurationSection)config; - activeUsers = new Dictionary(); - - for (var i = 0; i < basicAuth.Credentials.Count; i++) - { - var credential = basicAuth.Credentials[i]; - activeUsers.Add(credential.UserName, credential.Password); - } - - // Subscribe to the authenticate event to perform the authentication. - context.AuthenticateRequest += AuthenticateUser; - - // Subscribe to the EndRequest event to issue the authentication challenge if necessary. - context.EndRequest += IssueAuthenticationChallenge; - } - - public void Dispose() - { - // Do nothing here - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Authentication/CredentialElement.cs b/src/Simple.OData.Tests.Shared.ProductService/Authentication/CredentialElement.cs deleted file mode 100644 index 232a82e09..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Authentication/CredentialElement.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Configuration; - -namespace Devbridge.BasicAuthentication.Configuration; - -public class CredentialElement : ConfigurationElement -{ - private const string UserNameAttribute = "username"; - private const string PasswordAttribute = "password"; - - /// - /// Gets or sets the username. - /// - /// - /// The user name. - /// - [ConfigurationProperty(UserNameAttribute, IsRequired = true)] - public string UserName - { - get => Convert.ToString(this[UserNameAttribute]); - set => this[UserNameAttribute] = value; - } - - /// - /// Gets or sets the password. - /// - /// - /// The password. - /// - [ConfigurationProperty(PasswordAttribute, IsRequired = true)] - public string Password - { - get => Convert.ToString(this[PasswordAttribute]); - set => this[PasswordAttribute] = value; - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Authentication/CredentialElementCollection.cs b/src/Simple.OData.Tests.Shared.ProductService/Authentication/CredentialElementCollection.cs deleted file mode 100644 index adaebdca5..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Authentication/CredentialElementCollection.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Configuration; - -namespace Devbridge.BasicAuthentication.Configuration; - -[ConfigurationCollection(typeof(CredentialElement), CollectionType = ConfigurationElementCollectionType.BasicMap)] -public class CredentialElementCollection : ConfigurationElementCollection -{ - public CredentialElement this[int index] - { - get => (CredentialElement)BaseGet(index); - set - { - if (BaseGet(index) is not null) - { - BaseRemoveAt(index); - } - - BaseAdd(index, value); - } - } - - protected override ConfigurationElement CreateNewElement() - { - return new CredentialElement(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((CredentialElement)element).UserName; - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Controllers/ProductsController.cs b/src/Simple.OData.Tests.Shared.ProductService/Controllers/ProductsController.cs deleted file mode 100644 index 6503ff410..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Controllers/ProductsController.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System.Data.Entity; -using System.Data.Entity.Infrastructure; -using System.Net; -using System.Web.Http; -using System.Web.Http.OData; -using Simple.OData.Tests.Shared.ProductService.Models; - -namespace Simple.OData.Tests.Shared.ProductService.Controllers; - -/* -To add a route for this controller, merge these statements into the Register method of the WebApiConfig class. Note that OData URLs are case sensitive. - -using System.Web.Http.OData.Builder; -using ProductService.Models; -ODataConventionModelBuilder builder = new ODataConventionModelBuilder(); -builder.EntitySet("Products"); -config.Routes.MapODataRoute("odata", "odata", builder.GetEdmModel()); -*/ -public class ProductsController : ODataController -{ - private readonly ProductServiceContext db = new(); - - - // GET odata/Products - [EnableQuery] - public IQueryable GetProducts() - { - return db.Products; - } - - // GET odata/Products(5) - [EnableQuery] - public SingleResult GetProduct([FromODataUri] int key) - { - return SingleResult.Create(db.Products.Where(product => product.ID == key)); - } - - // PUT odata/Products(5) - public IHttpActionResult Put([FromODataUri] int key, Product product) - { - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - if (key != product.ID) - { - return BadRequest(); - } - - db.Entry(product).State = EntityState.Modified; - - try - { - db.SaveChanges(); - } - catch (DbUpdateConcurrencyException) - { - if (!ProductExists(key)) - { - return NotFound(); - } - else - { - throw; - } - } - - return Updated(product); - } - - // POST odata/Products - public IHttpActionResult Post(Product product) - { - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - db.Products.Add(product); - db.SaveChanges(); - - return Created(product); - } - - // PATCH odata/Products(5) - [AcceptVerbs("PATCH", "MERGE")] - public IHttpActionResult Patch([FromODataUri] int key, Delta patch) - { - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - var product = db.Products.Find(key); - if (product is null) - { - return NotFound(); - } - - patch.Patch(product); - - try - { - db.SaveChanges(); - } - catch (DbUpdateConcurrencyException) - { - if (!ProductExists(key)) - { - return NotFound(); - } - else - { - throw; - } - } - - return Updated(product); - } - - // DELETE odata/Products(5) - public IHttpActionResult Delete([FromODataUri] int key) - { - var product = db.Products.Find(key); - if (product is null) - { - return NotFound(); - } - - db.Products.Remove(product); - db.SaveChanges(); - - return StatusCode(HttpStatusCode.NoContent); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - db.Dispose(); - } - - base.Dispose(disposing); - } - - private bool ProductExists(int key) - { - return db.Products.Count(e => e.ID == key) > 0; - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Controllers/WorkTaskModelsController.cs b/src/Simple.OData.Tests.Shared.ProductService/Controllers/WorkTaskModelsController.cs deleted file mode 100644 index 1698621cb..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Controllers/WorkTaskModelsController.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System.Data.Entity; -using System.Data.Entity.Infrastructure; -using System.Net; -using System.Web.Http; -using System.Web.Http.OData; -using Simple.OData.Tests.Shared.ProductService.Models; - -namespace Simple.OData.Tests.Shared.ProductService.Controllers; - -public class WorkTaskModelsController : ODataController -{ - private readonly ProductServiceContext db = new(); - - - // GET odata/WorkTaskModels - [EnableQuery] - public IQueryable GetWorkTaskModels() - { - return db.WorkTaskModels; - } - - // GET odata/WorkTaskModels(5) - [EnableQuery] - public SingleResult GetWorkTaskModel([FromODataUri] Guid key) - { - return SingleResult.Create(db.WorkTaskModels.Where(workTaskModel => workTaskModel.Id == key)); - } - - // PUT odata/WorkTaskModels(5) - public IHttpActionResult Put([FromODataUri] Guid key, WorkTaskModel workTaskModel) - { - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - if (key != workTaskModel.Id) - { - return BadRequest(); - } - - db.Entry(workTaskModel).State = EntityState.Modified; - - try - { - db.SaveChanges(); - } - catch (DbUpdateConcurrencyException) - { - if (!WorkTaskModelExists(key)) - { - return NotFound(); - } - else - { - throw; - } - } - - return Updated(workTaskModel); - } - - // POST odata/WorkTaskModels - public IHttpActionResult Post(WorkTaskModel workTaskModel) - { - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - db.WorkTaskModels.Add(workTaskModel); - db.SaveChanges(); - - return Created(workTaskModel); - } - - // PATCH odata/WorkTaskModels(5) - [AcceptVerbs("PATCH", "MERGE")] - public IHttpActionResult Patch([FromODataUri] Guid key, Delta patch) - { - if (!ModelState.IsValid) - { - return BadRequest(ModelState); - } - - var workTaskModel = db.WorkTaskModels.Find(key); - if (workTaskModel is null) - { - return NotFound(); - } - - patch.Patch(workTaskModel); - - try - { - db.SaveChanges(); - } - catch (DbUpdateConcurrencyException) - { - if (!WorkTaskModelExists(key)) - { - return NotFound(); - } - else - { - throw; - } - } - - return Updated(workTaskModel); - } - - // DELETE odata/WorkTaskModels(5) - public IHttpActionResult Delete([FromODataUri] Guid key) - { - var workTaskModel = db.WorkTaskModels.Find(key); - if (workTaskModel is null) - { - return NotFound(); - } - - db.WorkTaskModels.Remove(workTaskModel); - db.SaveChanges(); - - return StatusCode(HttpStatusCode.NoContent); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - db.Dispose(); - } - - base.Dispose(disposing); - } - - private bool WorkTaskModelExists(Guid key) - { - return db.WorkTaskModels.Count(e => e.Id == key) > 0; - } - -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Global.asax b/src/Simple.OData.Tests.Shared.ProductService/Global.asax deleted file mode 100644 index 6abf450b3..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="Simple.OData.Tests.Shared.ProductService.WebApiApplication" Language="C#" %> diff --git a/src/Simple.OData.Tests.Shared.ProductService/Global.asax.cs b/src/Simple.OData.Tests.Shared.ProductService/Global.asax.cs deleted file mode 100644 index 69a554d78..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Global.asax.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Web.Http; -using Simple.OData.Tests.Shared.ProductService.App_Start; - -namespace Simple.OData.Tests.Shared.ProductService; - -public class WebApiApplication : System.Web.HttpApplication -{ - protected static void Application_Start() - { - GlobalConfiguration.Configure(WebApiConfig.Register); - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.Designer.cs b/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.Designer.cs deleted file mode 100644 index f94655cb2..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.Designer.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -namespace Simple.OData.Tests.Shared.ProductService.Migrations -{ - using System.CodeDom.Compiler; - using System.Data.Entity.Migrations; - using System.Data.Entity.Migrations.Infrastructure; - using System.Resources; - - [GeneratedCode("EntityFramework.Migrations", "6.0.0-20911")] - public sealed partial class Initial : IMigrationMetadata - { - private readonly ResourceManager Resources = new ResourceManager(typeof(Initial)); - - string IMigrationMetadata.Id - { - get { return "201401161840343_Initial"; } - } - - string IMigrationMetadata.Source - { - get { return null; } - } - - string IMigrationMetadata.Target - { - get { return Resources.GetString("Target"); } - } - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.cs b/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.cs deleted file mode 100644 index fb206b913..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.cs +++ /dev/null @@ -1,83 +0,0 @@ -namespace Simple.OData.Tests.Shared.ProductService.Migrations; - -using System.Data.Entity.Migrations; - -public partial class Initial : DbMigration -{ - public override void Up() - { - CreateTable( - "dbo.Products", - c => new - { - ID = c.Int(nullable: false, identity: true), - Name = c.String(), - Price = c.Decimal(nullable: false, precision: 18, scale: 2), - Category = c.String(), - }) - .PrimaryKey(t => t.ID); - - CreateTable( - "dbo.WorkTaskModels", - c => new - { - Id = c.Guid(nullable: false), - Code = c.String(), - StartDate = c.DateTime(nullable: false), - EndDate = c.DateTime(nullable: false), - State = c.Guid(nullable: false), - Location_Latitude = c.Double(nullable: false), - Location_Longitude = c.Double(nullable: false), - WorkerId = c.Guid(nullable: false), - CustomerId = c.Guid(nullable: false), - }) - .PrimaryKey(t => t.Id); - - CreateTable( - "dbo.WorkTaskAttachmentModels", - c => new - { - Id = c.Guid(nullable: false), - Type = c.Guid(nullable: false), - FileName = c.String(), - WorkTaskId = c.Guid(nullable: false), - WorkTaskModel_Id = c.Guid(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.WorkTaskModels", t => t.WorkTaskModel_Id) - .Index(t => t.WorkTaskModel_Id); - - CreateTable( - "dbo.WorkActivityReportModels", - c => new - { - Id = c.Guid(nullable: false), - Code = c.String(), - StartDate = c.DateTime(nullable: false), - EndDate = c.DateTime(nullable: false), - Description = c.String(), - Type = c.Guid(nullable: false), - Location_Latitude = c.Double(nullable: false), - Location_Longitude = c.Double(nullable: false), - WorkTaskId = c.Guid(nullable: false), - WorkerId = c.Guid(nullable: false), - WorkTaskModel_Id = c.Guid(), - }) - .PrimaryKey(t => t.Id) - .ForeignKey("dbo.WorkTaskModels", t => t.WorkTaskModel_Id) - .Index(t => t.WorkTaskModel_Id); - - } - - public override void Down() - { - DropForeignKey("dbo.WorkActivityReportModels", "WorkTaskModel_Id", "dbo.WorkTaskModels"); - DropForeignKey("dbo.WorkTaskAttachmentModels", "WorkTaskModel_Id", "dbo.WorkTaskModels"); - DropIndex("dbo.WorkActivityReportModels", new[] { "WorkTaskModel_Id" }); - DropIndex("dbo.WorkTaskAttachmentModels", new[] { "WorkTaskModel_Id" }); - DropTable("dbo.WorkActivityReportModels"); - DropTable("dbo.WorkTaskAttachmentModels"); - DropTable("dbo.WorkTaskModels"); - DropTable("dbo.Products"); - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.resx b/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.resx deleted file mode 100644 index 0a30f75d6..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Migrations/201401161840343_Initial.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 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 - - - dbo - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.ProductService/Migrations/Configuration.cs b/src/Simple.OData.Tests.Shared.ProductService/Migrations/Configuration.cs deleted file mode 100644 index 4e1b76044..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Migrations/Configuration.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Data.Entity.Migrations; -using Simple.OData.Tests.Shared.ProductService.Models; - -namespace Simple.OData.Tests.Shared.ProductService.Migrations; - -internal sealed class Configuration : DbMigrationsConfiguration -{ - public Configuration() - { - AutomaticMigrationsEnabled = false; - } - - protected override void Seed(global::Simple.OData.Tests.Shared.ProductService.Models.ProductServiceContext context) - { - // New code - context.Products.AddOrUpdate([ - new Product() { ID = 1, Name = "Hat", Price = 15, Category = "Apparel" }, - new Product() { ID = 2, Name = "Socks", Price = 5, Category = "Apparel" }, - new Product() { ID = 3, Name = "Scarf", Price = 12, Category = "Apparel" }, - new Product() { ID = 4, Name = "Yo-yo", Price = 4.95M, Category = "Toys" }, - new Product() { ID = 5, Name = "Puzzle", Price = 8, Category = "Toys" }, - ]); - - context.WorkTaskModels.AddOrUpdate( - [ - new WorkTaskModel() - { - Id = Guid.NewGuid(), - Code = "TaskCode", - StartDate = DateTime.Now.AddDays(-1), - EndDate = DateTime.Now.AddDays(-1), - Location = new GeoLocationModel() { Longitude = 1, Latitude = 2 }, - Attachments = [], - WorkActivityReports = [], - } - ]); - } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Models/BaseModel.cs b/src/Simple.OData.Tests.Shared.ProductService/Models/BaseModel.cs deleted file mode 100644 index b94702a7f..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Models/BaseModel.cs +++ /dev/null @@ -1,7 +0,0 @@ -// ReSharper disable CheckNamespace -namespace Simple.OData.Tests.Shared.ProductService.Models; - -public abstract class BaseModel -{ - public Guid Id { get; set; } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Models/GeoLocationModel.cs b/src/Simple.OData.Tests.Shared.ProductService/Models/GeoLocationModel.cs deleted file mode 100644 index abbf1344d..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Models/GeoLocationModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -// ReSharper disable CheckNamespace -namespace Simple.OData.Tests.Shared.ProductService.Models; - -public class GeoLocationModel -{ - public double Latitude { get; set; } - public double Longitude { get; set; } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Models/Product.cs b/src/Simple.OData.Tests.Shared.ProductService/Models/Product.cs deleted file mode 100644 index c3bf3d06b..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Models/Product.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Simple.OData.Tests.Shared.ProductService.Models; - -public class Product -{ - public int ID { get; set; } - public string Name { get; set; } - public decimal Price { get; set; } - public string Category { get; set; } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Models/ProductServiceContext.cs b/src/Simple.OData.Tests.Shared.ProductService/Models/ProductServiceContext.cs deleted file mode 100644 index 4204a7524..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Models/ProductServiceContext.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Data.Entity; - -namespace Simple.OData.Tests.Shared.ProductService.Models; - -public class ProductServiceContext : DbContext -{ - // You can add custom code to this file. Changes will not be overwritten. - // - // If you want Entity Framework to drop and regenerate your database - // automatically whenever you change your model schema, please use data migrations. - // For more information refer to the documentation: - // http://msdn.microsoft.com/en-us/data/jj591621.aspx - - public ProductServiceContext() - : base("name=DefaultConnection") - { - } - - public System.Data.Entity.DbSet Products { get; set; } - public System.Data.Entity.DbSet WorkTaskModels { get; set; } - public System.Data.Entity.DbSet WorkTaskAttachmentModels { get; set; } - public System.Data.Entity.DbSet WorkActivityReportModels { get; set; } - -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Models/WorkActivityReportModel.cs b/src/Simple.OData.Tests.Shared.ProductService/Models/WorkActivityReportModel.cs deleted file mode 100644 index b5dfb888b..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Models/WorkActivityReportModel.cs +++ /dev/null @@ -1,14 +0,0 @@ -// ReSharper disable CheckNamespace -namespace Simple.OData.Tests.Shared.ProductService.Models; - -public class WorkActivityReportModel : BaseModel -{ - public string Code { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } - public string Description { get; set; } - public Guid Type { get; set; } - public GeoLocationModel Location { get; set; } - public Guid WorkTaskId { get; set; } - public Guid WorkerId { get; set; } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Models/WorkTaskAttachmentModel.cs b/src/Simple.OData.Tests.Shared.ProductService/Models/WorkTaskAttachmentModel.cs deleted file mode 100644 index 39f187bc4..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Models/WorkTaskAttachmentModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -// ReSharper disable CheckNamespace -namespace Simple.OData.Tests.Shared.ProductService.Models; - -public class WorkTaskAttachmentModel : BaseModel -{ - public Guid Type { get; set; } - public string FileName { get; set; } - public Guid WorkTaskId { get; set; } -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Models/WorkTaskModel.cs b/src/Simple.OData.Tests.Shared.ProductService/Models/WorkTaskModel.cs deleted file mode 100644 index 87752739d..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Models/WorkTaskModel.cs +++ /dev/null @@ -1,22 +0,0 @@ -// ReSharper disable CheckNamespace -namespace Simple.OData.Tests.Shared.ProductService.Models; - -public class WorkTaskModel : BaseModel -{ - public WorkTaskModel() - { - Attachments = []; - WorkActivityReports = []; - } - - public string Code { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } - public Guid State { get; set; } - public GeoLocationModel Location { get; set; } - public Guid WorkerId { get; set; } - public Guid CustomerId { get; set; } - public List Attachments { get; set; } - public List WorkActivityReports { get; set; } - -} diff --git a/src/Simple.OData.Tests.Shared.ProductService/Properties/launchSettings.json b/src/Simple.OData.Tests.Shared.ProductService/Properties/launchSettings.json deleted file mode 100644 index b6caf8c13..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Properties/launchSettings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "profiles": { - "Simple.OData.Tests.Shared.ProductService": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "http://localhost:62472" - } - } -} \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.ProductService/Simple.OData.Tests.Shared.ProductService.csproj b/src/Simple.OData.Tests.Shared.ProductService/Simple.OData.Tests.Shared.ProductService.csproj deleted file mode 100644 index f502a8ed6..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Simple.OData.Tests.Shared.ProductService.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net48 - $(DocumentationFile)\$(AssemblyName).xml - true - Simple.OData.Tests.Shared.ProductService - true - true - - - - - - - - - - - - - - - diff --git a/src/Simple.OData.Tests.Shared.ProductService/Web.Debug.config b/src/Simple.OData.Tests.Shared.ProductService/Web.Debug.config deleted file mode 100644 index 2e302f9f9..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.ProductService/Web.Release.config b/src/Simple.OData.Tests.Shared.ProductService/Web.Release.config deleted file mode 100644 index c35844462..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.ProductService/Web.config b/src/Simple.OData.Tests.Shared.ProductService/Web.config deleted file mode 100644 index be01c4d24..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/Web.config +++ /dev/null @@ -1,81 +0,0 @@ - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Simple.OData.Tests.Shared.ProductService/basicAuthentication.config b/src/Simple.OData.Tests.Shared.ProductService/basicAuthentication.config deleted file mode 100644 index 8773ab9a8..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/basicAuthentication.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/Simple.OData.Tests.Shared.ProductService/packages.config b/src/Simple.OData.Tests.Shared.ProductService/packages.config deleted file mode 100644 index 2f37e7fb4..000000000 --- a/src/Simple.OData.Tests.Shared.ProductService/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file