Skip to content

Commit

Permalink
fix #29
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang committed May 23, 2019
1 parent 9413ec8 commit a60c1b2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build/version.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<VersionMajor>2</VersionMajor>
<VersionMinor>2</VersionMinor>
<VersionPatch>45</VersionPatch>
<VersionPatch>46</VersionPatch>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion doc/SmartCode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Output:
Type: File
Path: 'E:\SmartSql-Starter'
Parameters:
SmartSqlVersion: '4.0.42'
SmartSqlVersion: '4.0.46'
SmartSqlSchemaVersion: '4.0.42'
BuildDir: 'E:\SmartSql-Starter\build'
DockerImage: 'smartsql.starter'
Expand Down
1 change: 0 additions & 1 deletion src/SmartCode.App/SmartCodeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public class SmartCodeOptions
{
public string Name { get; } = "SmartCode";
public string Author { get; } = "Ahoo Wang";
public string Version { get; set; } = "1.0.0";
public string Github { get; } = "https://github.com/Ahoo-Wang/SmartCode";
public String ConfigPath { get; set; }
public IServiceCollection Services { get; set; } = new ServiceCollection();
Expand Down
1 change: 0 additions & 1 deletion src/SmartCode.CLI/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
}
},
"SmartCode": {
"Version": "v2.2.28",
"Plugins": [
{
"Type": "SmartCode.IDataSource,SmartCode",
Expand Down
12 changes: 6 additions & 6 deletions src/SmartCode.Db/SmartCode.Db.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SmartSql.Options" Version="4.0.42" />
<PackageReference Include="SmartSql.TypeHandler" Version="4.0.42" />
<PackageReference Include="SmartSql.TypeHandler.PostgreSql" Version="4.0.42" />
<PackageReference Include="System.Data.SqlClient" Version="4.6.0" />
<PackageReference Include="SmartSql.Options" Version="4.0.46" />
<PackageReference Include="SmartSql.TypeHandler" Version="4.0.46" />
<PackageReference Include="SmartSql.TypeHandler.PostgreSql" Version="4.0.46" />
<PackageReference Include="System.Data.SqlClient" Version="4.6.1" />
<PackageReference Include="System.Data.SQLite" Version="1.0.110" />
<PackageReference Include="MySql.Data" Version="8.0.16" />
<PackageReference Include="Npgsql" Version="4.0.6" />
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.18.6" />
<PackageReference Include="Npgsql" Version="4.0.7" />
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.19.3" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/SmartCode.ETL/SmartCode.ETL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SmartSql.Bulk.MySql" Version="4.0.42" />
<PackageReference Include="SmartSql.Bulk.PostgreSql" Version="4.0.42" />
<PackageReference Include="SmartSql.Bulk.SqlServer" Version="4.0.42" />
<PackageReference Include="SmartSql.Bulk.MySql" Version="4.0.46" />
<PackageReference Include="SmartSql.Bulk.PostgreSql" Version="4.0.46" />
<PackageReference Include="SmartSql.Bulk.SqlServer" Version="4.0.46" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/SmartCode.Generator/RazorTemplates/CSharp/Repository.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var autoIncrement = table.AutoIncrement;
var dbSource = Model.GetDataSource<DbSource>();

var PKNameEQId = pkCol.Name == "Id";
var PKNameEQId = pkCol.ConvertedName == "Id";
}

using System;
Expand Down Expand Up @@ -58,22 +58,22 @@ public interface I@(table.ConvertedName)Repository : IRepository<@(table.Convert
{
<text>[Statement(Id = "GetEntity")]</text>
@Html.NewLine()
@Html.PadLeft(8) <text>new @table.ConvertedName GetById([Param("@pkCol.Name")]@primaryKeyType id);</text>
@Html.PadLeft(8) <text>new @table.ConvertedName GetById([Param("@pkCol.ConvertedName")]@primaryKeyType id);</text>
@Html.NewLine()

<text>[Statement(Id = "GetEntity")]</text>
@Html.NewLine()
@Html.PadLeft(8) <text>new Task<@table.ConvertedName> GetByIdAsync([Param("@pkCol.Name")]@primaryKeyType id);</text>
@Html.PadLeft(8) <text>new Task<@table.ConvertedName> GetByIdAsync([Param("@pkCol.ConvertedName")]@primaryKeyType id);</text>
@Html.NewLine()

<text>[Statement(Id = "Delete")]</text>
@Html.NewLine()
@Html.PadLeft(8) <text>new int DeleteById([Param("@pkCol.Name")]@primaryKeyType id);</text>
@Html.PadLeft(8) <text>new int DeleteById([Param("@pkCol.ConvertedName")]@primaryKeyType id);</text>
@Html.NewLine()

<text>[Statement(Id = "Delete")]</text>
@Html.NewLine()
@Html.PadLeft(8) <text>new Task<@("int")> DeleteByIdAsync([Param("@pkCol.Name")]@primaryKeyType id);</text>
@Html.PadLeft(8) <text>new Task<@("int")> DeleteByIdAsync([Param("@pkCol.ConvertedName")]@primaryKeyType id);</text>
@Html.NewLine()

}
Expand Down

0 comments on commit a60c1b2

Please sign in to comment.