Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e20f47b
Use FluentMigration to populate the database
abbasmhd Apr 8, 2023
0f4e256
Update dotnet.yml
abbasmhd Apr 8, 2023
b274984
async optimisation
abbasmhd Apr 21, 2023
b966df4
refactoring
abbasmhd Apr 24, 2023
433c00b
update test file
abbasmhd Apr 24, 2023
95c9572
merge
abbasmhd Apr 24, 2023
9ead329
update test
abbasmhd Apr 24, 2023
aa395f6
merge
abbasmhd Apr 24, 2023
f707ca7
don't run in build
abbasmhd Apr 24, 2023
aded1b9
Add XML documentations
abbasmhd Apr 25, 2023
ed7a32c
merge
abbasmhd Apr 25, 2023
68d386f
Merge branch 'main' into development
abbasmhd Apr 25, 2023
8399f87
move test project
abbasmhd Apr 25, 2023
60a8607
fix reference and bulild
abbasmhd Apr 25, 2023
ff726fb
Merge branch 'main' into development
abbasmhd Apr 25, 2023
4dbe501
Add more tests for sql extention
abbasmhd Apr 30, 2023
d7eb07e
Add ColumnDefinitionBuilder
abbasmhd May 31, 2023
2bae954
merge
abbasmhd May 31, 2023
b85e676
Upgrade to .Net 8.0
abbasmhd May 24, 2024
4108c92
rem file
abbasmhd May 24, 2024
3f80aba
format
abbasmhd May 24, 2024
82b2849
update global json file
abbasmhd May 24, 2024
a9ef8fd
fix build
abbasmhd May 24, 2024
b472a6a
build
abbasmhd May 24, 2024
5aa9c96
Merge branch 'main' into development
abbasmhd May 24, 2024
b5ab051
Docs(readme): update readme with comprehensive project documentation
abbasmhd Feb 23, 2025
6d64561
Docs(guides): add comprehensive documentation guides
abbasmhd Feb 23, 2025
71e593c
Chore(deps): update actions/upload-artifact to v4
abbasmhd Feb 23, 2025
e16a54c
Fix(ci): update GitHub Pages workflow to use official actions
abbasmhd Feb 23, 2025
f042bfd
Merge branch 'main' into development
abbasmhd Feb 23, 2025
a40bbc7
Fix(ci): simplify GitHub Pages workflow to use pure GitHub Actions
abbasmhd Feb 23, 2025
d9b4036
Merge branch 'main' into development
abbasmhd Feb 23, 2025
b18f5f1
Fix(ci): remove no-build flag to resolve NETSDK1085 error
abbasmhd Feb 23, 2025
e7d5403
Merge branch 'development' of https://github.com/abbasmhd/ProxyR into…
abbasmhd Feb 23, 2025
6267660
Fix(ci): remove Jekyll and simplify GitHub Pages deployment
abbasmhd Feb 23, 2025
4cf5eed
Merge branch 'main' into development
abbasmhd Feb 23, 2025
83cb99b
Feat(branding): add project metadata and icon
abbasmhd Feb 23, 2025
4af5879
Fix(branding): correct SVG icon format
abbasmhd Feb 23, 2025
90d9f32
Fix(branding): correct SVG icon format
abbasmhd Feb 23, 2025
3118172
Style(branding): update icon color to brand blue
abbasmhd Feb 23, 2025
06a718b
Style(branding): resolve conflicts in icon color update (#0366d6)
abbasmhd Feb 23, 2025
5cb4a8f
Chore(version): set initial pre-release version 0.0.1-alpha
abbasmhd Feb 23, 2025
4d7876c
Merge branch 'main' into chore/initial-prerelease-version
abbasmhd Feb 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,28 @@ A powerful .NET middleware that automatically exposes SQL Server table-valued fu
Add the ProxyR middleware to your ASP.NET Core project:

```bash
dotnet add package ProxyR.Middleware
# Install latest pre-release version
dotnet add package Abbasmhd.ProxyR --prerelease

# Or install specific version
dotnet add package Abbasmhd.ProxyR --version 0.0.1-alpha
```

Note: The package is published under the namespace `Abbasmhd.ProxyR` to follow NuGet naming conventions. This is currently a pre-release version (0.0.1-alpha) and the API may change without notice.

### Basic Configuration

In your `Startup.cs`:
In your `Startup.cs` or `Program.cs`:

```csharp
using ProxyR.Middleware; // Add this using statement

public void ConfigureServices(IServiceCollection services)
{
// Method 1: Using configuration section
services.AddProxyR(Configuration.GetSection("ProxyR"));

// Method 2: Using fluent configuration
services.AddProxyR(options => options
.UseConnectionString("your_connection_string")
.UseDefaultSchema("dbo")
Expand All @@ -40,6 +52,7 @@ public void ConfigureServices(IServiceCollection services)

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// Add ProxyR middleware to the pipeline
app.UseProxyR();
}
```
Expand All @@ -50,7 +63,11 @@ In your `appsettings.json`:

```json
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=YourDatabase;Trusted_Connection=True;"
},
"ProxyR": {
"ConnectionStringName": "DefaultConnection", // Reference connection string by name
"Prefix": "Api_",
"Suffix": "",
"Seperator": "_",
Expand Down
28 changes: 21 additions & 7 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,45 @@ This guide will help you get up and running with ProxyR in your .NET application
2. Install the ProxyR NuGet package:

```bash
dotnet add package ProxyR.Middleware
dotnet add package Abbasmhd.ProxyR
```

Note: The package is published under the namespace `Abbasmhd.ProxyR` to follow NuGet naming conventions. This is the official package name and should be used instead of other variations.

## Basic Setup

### 1. Database Setup
### 1. Add Required Namespaces

First, create a dedicated schema for your API endpoints:
In your `Startup.cs` or `Program.cs`, add the following namespace:

```sql
CREATE SCHEMA [ProxyR] AUTHORIZATION [dbo]
```csharp
using ProxyR.Middleware;
```

### 2. Configure Services

In your `Startup.cs` or `Program.cs`, add ProxyR to your services:
Add ProxyR to your services in one of these ways:

```csharp
public void ConfigureServices(IServiceCollection services)
{
// Method 1: Using configuration section (recommended)
services.AddProxyR(Configuration.GetSection("ProxyR"));

// Method 2: Using fluent configuration
services.AddProxyR(options => options
.UseConnectionString("your_connection_string")
.UseDefaultSchema("ProxyR")
.UseFunctionNamePrefix("Api_")
);

// Method 3: Using connection string from configuration
services.AddProxyR(options => options
.UseConnectionStringName("DefaultConnection")
.UseDefaultSchema("ProxyR")
.UseFunctionNamePrefix("Api_")
);

// Optional: Add OpenAPI/Swagger support
services.AddOpenApi(options =>
{
Expand All @@ -61,7 +74,7 @@ Add ProxyR to your application pipeline:
```csharp
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// ... other middleware
// ... other middleware ...

app.UseProxyR();

Expand All @@ -84,6 +97,7 @@ Add ProxyR settings to your `appsettings.json`:
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=YourDatabase;Trusted_Connection=True;"
},
"ProxyR": {
"ConnectionStringName": "DefaultConnection",
"Prefix": "Api_",
"Suffix": "",
"Seperator": "_",
Expand Down
93 changes: 54 additions & 39 deletions docs/docs/nuget-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ title: NuGet Package Publishing

This guide explains how to publish ProxyR packages to both GitHub Packages and NuGet.org.

## Package Versioning

### Pre-release Packages

ProxyR is currently in pre-release stage, following semantic versioning with alpha/beta designations:

- Current Version: `0.0.1-alpha`
- Format: `MAJOR.MINOR.PATCH-PRERELEASE`

Pre-release versions indicate that the API is not yet stable and may change without notice.

### Version Strategy

We use Semantic Versioning (SemVer) with pre-release identifiers:
- MAJOR version (0.y.z) - API is not stable
- MINOR version (x.y.z) - New features in pre-release
- PATCH version (x.y.z) - Bug fixes in pre-release
- Pre-release suffix: -alpha, -beta, -rc.1, etc.

## Package Configuration

### 1. Update Project File
Expand All @@ -15,8 +34,9 @@ Ensure your `.csproj` files include the necessary package metadata:

```xml
<PropertyGroup>
<PackageId>ProxyR.Core</PackageId>
<Version>1.0.0</Version>
<PackageId>Abbasmhd.ProxyR</PackageId>
<Version>0.0.1</Version>
<VersionSuffix>alpha</VersionSuffix>
<Authors>abbasmhd</Authors>
<Company>ProxyR</Company>
<Description>A powerful .NET middleware that automatically exposes SQL Server functions and views as REST API endpoints. ProxyR simplifies API creation by automatically mapping database objects to RESTful endpoints with minimal configuration.</Description>
Expand Down Expand Up @@ -54,66 +74,61 @@ Ensure your `.csproj` files include the necessary package metadata:
</ItemGroup>
```

### 2. Package Versioning
## Installation

### Installing Pre-release Packages

From NuGet.org:
```bash
dotnet add package Abbasmhd.ProxyR --version 0.0.1-alpha
```

From GitHub Packages:
```bash
dotnet add package Abbasmhd.ProxyR --version 0.0.1-alpha --source github
```

### Latest Pre-release Version

We use Semantic Versioning (SemVer):
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality
- PATCH version for backwards-compatible bug fixes
To always get the latest pre-release version:
```bash
dotnet add package Abbasmhd.ProxyR --prerelease
```

## Automated Publishing
## Publishing Process

### Release Process
### Creating Pre-release Tags

1. Create and push a new version tag:
1. Create and push a new pre-release version tag:
```bash
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git tag -a v0.0.1-alpha -m "Initial alpha release"
git push origin v0.0.1-alpha
```

2. The NuGet workflow will automatically:
- Build and test the solution
- Create NuGet packages
- Create NuGet packages with pre-release suffix
- Publish to GitHub Packages
- Publish to NuGet.org (only for tagged releases)

### Required Secrets

1. `GITHUB_TOKEN` (automatically provided)
- Used for publishing to GitHub Packages
- No configuration needed

2. `NUGET_API_KEY`
- Required for publishing to NuGet.org
- Create at [NuGet.org](https://www.nuget.org)
- Add to repository secrets

## Manual Publishing

### Local Package Creation

```bash
dotnet pack --configuration Release
```

### Publishing to NuGet.org
### Manual Publishing

Local package creation with version suffix:
```bash
dotnet nuget push "bin/Release/ProxyR.Core.1.0.0.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key YOUR_API_KEY
dotnet pack --configuration Release /p:VersionSuffix=alpha
```

### Publishing to GitHub Packages

Publishing to NuGet.org:
```bash
dotnet nuget push "bin/Release/ProxyR.Core.1.0.0.nupkg" --source "https://nuget.pkg.github.com/abbasmhd/index.json" --api-key YOUR_GITHUB_TOKEN
dotnet nuget push "bin/Release/Abbasmhd.ProxyR.0.0.1-alpha.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key YOUR_API_KEY
```

## Package Installation

### From NuGet.org

```bash
dotnet add package ProxyR.Core
dotnet add package Abbasmhd.ProxyR
```

### From GitHub Packages
Expand All @@ -125,7 +140,7 @@ dotnet add package ProxyR.Core

2. Install the package:
```bash
dotnet add package ProxyR.Core
dotnet add package Abbasmhd.ProxyR
```

## Troubleshooting
Expand Down
37 changes: 37 additions & 0 deletions src/ProxyR.Core/ProxyR.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,43 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PackageId>Abbasmhd.ProxyR</PackageId>
<Version>0.0.1</Version>
<VersionSuffix>alpha</VersionSuffix>
<Authors>abbasmhd</Authors>
<Company>ProxyR</Company>
<Description>A powerful .NET middleware that automatically exposes SQL Server functions and views as REST API endpoints. ProxyR simplifies API creation by automatically mapping database objects to RESTful endpoints with minimal configuration.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://abbasmhd.github.io/ProxyR/</PackageProjectUrl>
<RepositoryUrl>https://github.com/abbasmhd/ProxyR.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>api;rest;sql-server;middleware;dotnet;database;proxy;rest-api;aspnetcore;webapi;database-first;auto-api</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>https://github.com/abbasmhd/ProxyR/releases</PackageReleaseNotes>
<PackageIcon>icon.svg</PackageIcon>
<PackageIconUrl>https://abbasmhd.github.io/ProxyR/assets/images/icon.svg</PackageIconUrl>
<DocumentationUrl>https://github.com/abbasmhd/ProxyR/wiki</DocumentationUrl>
<Copyright>Copyright © 2024 ProxyR</Copyright>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<DebugType>portable</DebugType>
<IncludeSource>true</IncludeSource>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<None Include="../../README.md" Pack="true" PackagePath="/" />
<None Include="../../docs/assets/images/icon.svg" Pack="true" PackagePath="/" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

</Project>