提交 2567751f 编写于 作者: 麦壳饼's avatar 麦壳饼

Merge branch 'master' of https://github.com/IoTSharp/IoTSharp

{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "6.0.8",
"commands": [
"dotnet-ef"
]
}
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ using IoTSharp.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;
namespace Microsoft.Extensions.DependencyInjection
{
......@@ -32,5 +33,17 @@ namespace Microsoft.Extensions.DependencyInjection
builder.AddDataSource(connectionString, ReadWriteType.Read | ReadWriteType.Write, DatabaseType.SQLite);
builder.SetDateSharding<TelemetryData>(nameof(TelemetryData.DateTime), expandBy, DateTime.Now);
}
public static void SetCaseInsensitiveSearchesForSQLite(this ModelBuilder modelBuilder)
{
modelBuilder.UseCollation("NOCASE");
foreach (var property in modelBuilder.Model.GetEntityTypes()
.SelectMany(t => t.GetProperties())
.Where(p => p.ClrType == typeof(string)))
{
property.SetCollation("NOCASE");
}
}
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using System;
using Microsoft.Extensions.DependencyInjection;
namespace IoTSharp.Data.Sqlite
{
......@@ -14,7 +15,7 @@ namespace IoTSharp.Data.Sqlite
public void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.SetCaseInsensitiveSearchesForSQLite();
}
}
}
\ No newline at end of file
......@@ -29,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{3048484A
tools\ef_mg_add.cmd = tools\ef_mg_add.cmd
tools\ef_mg_remove.cmd = tools\ef_mg_remove.cmd
tools\upgrade_ef.cmd = tools\upgrade_ef.cmd
setnpm.cmd = setnpm.cmd
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IoTSharp.SDKs", "IoTSharp.SDKs", "{86E9E4E0-24A0-4C89-A98B-B0D41C75B4F1}"
......
......@@ -19,7 +19,7 @@
<nz-tree-node *nzTreeNodeDef="let node; when: hasChild" nzTreeNodeIndentLine>
<nz-tree-node-toggle>
<i nz-icon nzType="caret-down" nzTreeNodeToggleRotateIcon></i>
<em nz-icon nzType="caret-down" nzTreeNodeToggleRotateIcon></em>
</nz-tree-node-toggle>
<nz-select [(ngModel)]="node.field">
......@@ -40,11 +40,11 @@
<nz-option nzLabel="OR" nzValue="||"></nz-option>
</nz-select>
<button nz-button nzType="text" nzSize="small" (click)="addNewNode(node)">
<i nz-icon nzType="plus" nzTheme="outline"></i>
<em nz-icon nzType="plus" nzTheme="outline"></em>
</button>
<button nz-button nzType="text" nzSize="small" (click)="delete(node)">
<i nz-icon nzType="minus" ></i>
<em nz-icon nzType="minus" ></em>
</button>
</nz-tree-node>
</nz-tree-view>
......@@ -53,10 +53,10 @@
<textarea nz-input placeholder="test expression" [(ngModel)]="expression" [nzAutosize]="{ minRows: 3, maxRows: 5 }"></textarea>
<ng-template #suffixTemplateInfo>
<i nz-icon nz-tooltip nzTooltipTitle="" nzType="info-circle" ></i>
<em nz-icon nz-tooltip nzTooltipTitle="" nzType="info-circle" ></em>
</ng-template>
</nz-row>
<nz-row class="customrow">
<button nz-button nzType="primary" nzShape="round" (click)="create()"><i nz-icon nzType="download"></i>生成</button>
<button nz-button nzType="primary" nzShape="round" (click)="close()"><i nz-icon nzType="download"></i>关闭</button></nz-row>
<button nz-button nzType="primary" nzShape="round" (click)="create()"><em nz-icon nzType="download"></em>生成</button>
<button nz-button nzType="primary" nzShape="round" (click)="close()"><em nz-icon nzType="download"></em>关闭</button></nz-row>
......@@ -39,7 +39,7 @@
</nz-input-group>
<ng-template #suffixTemplateInfo>
<i nz-icon nz-tooltip nzTooltipTitle="" nzType="info-circle" (click)="showce()" ></i>
<em nz-icon nz-tooltip nzTooltipTitle="" nzType="info-circle" (click)="showce()" ></em>
</ng-template>
</se>
......
......@@ -34,7 +34,7 @@ export default class CustomContextPad {
autoPlace.append(element, shape);
} else {
appendBuiltinShapeStart(event, element);
appendBuiltinShapeStart(event);
}
};
}
......@@ -77,4 +77,4 @@ CustomContextPad.$inject = [
'elementFactory',
'injector',
'translate'
];
\ No newline at end of file
];
......@@ -92,6 +92,7 @@
<PackageReference Include="IoTSharp.HealthChecks.Taos" Version="2.0.478" />
<PackageReference Include="MaiKeBing.HostedService.ZeroMQ" Version="1.0.35" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="6.0.8" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.16.1" />
<PackageReference Include="MQTTnet" Version="4.1.0.247" />
<PackageReference Include="MQTTnet.AspNetCore" Version="4.1.0.247" />
......@@ -106,7 +107,7 @@
<PackageReference Include="Silkier.AspNetCore" Version="1.0.592" />
<PackageReference Include="Silkier.EFCore" Version="1.0.592" />
<PackageReference Include="SilkierQuartz" Version="5.0.356" />
<PackageReference Include="SkiaSharp" Version="2.88.0" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0">
<TreatAsUsed>true</TreatAsUsed>
</PackageReference>
......
......@@ -2,4 +2,4 @@ echo off
cls
echo Drop to IoTSharp.Data.%1
set ASPNETCORE_ENVIRONMENT=%1
dotnet ef database drop --context IoTSharp.Data.ApplicationDbContext --startup-project ..\IoTSharp\IoTSharp.csproj --project ..\IoTSharp.Data.%1\IoTSharp.Data.%1.csproj
\ No newline at end of file
dotnet dotnet-ef database drop --context IoTSharp.Data.ApplicationDbContext --startup-project ..\IoTSharp\IoTSharp.csproj --project ..\IoTSharp.Data.%1\IoTSharp.Data.%1.csproj
\ No newline at end of file
......@@ -2,4 +2,4 @@ echo off
cls
echo Add a migration name is %2 to IoTSharp.Data.%1
set ASPNETCORE_ENVIRONMENT=%1
dotnet ef migrations add %2 --context IoTSharp.Data.ApplicationDbContext --startup-project ..\IoTSharp\IoTSharp.csproj --project ..\IoTSharp.Data.%1\IoTSharp.Data.%1.csproj
\ No newline at end of file
dotnet dotnet-ef migrations add %2 --context IoTSharp.Data.ApplicationDbContext --startup-project ..\IoTSharp\IoTSharp.csproj --project ..\IoTSharp.Data.%1\IoTSharp.Data.%1.csproj
\ No newline at end of file
......@@ -2,4 +2,4 @@ echo off
cls
echo remove a migration from IoTSharp.Data.%1
set ASPNETCORE_ENVIRONMENT=%1
dotnet ef migrations remove --context IoTSharp.Data.ApplicationDbContext --startup-project ..\IoTSharp\IoTSharp.csproj --project ..\IoTSharp.Data.%1\IoTSharp.Data.%1.csproj
\ No newline at end of file
dotnet dotnet-ef migrations remove --context IoTSharp.Data.ApplicationDbContext --startup-project ..\IoTSharp\IoTSharp.csproj --project ..\IoTSharp.Data.%1\IoTSharp.Data.%1.csproj
\ No newline at end of file
npm config set registry https://registry.npmmirror.com
\ No newline at end of file
dotnet tool update --global dotnet-ef
\ No newline at end of file
dotnet tool update dotnet-ef
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册