Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit f227a41

Browse files
authored
Migration to Azure Pipelines (#22)
* - remove appveyor support - add azure build and nuget deploy - add NRT annotations * fixes * fixes * fix nuget build * another try * NugetCommand is useless without working dir * fix nuspec * revert NRT * update readme
1 parent bfa5871 commit f227a41

15 files changed

+239
-143
lines changed

Build/AppVeyor.FixVersionProps.ps1

Lines changed: 0 additions & 40 deletions
This file was deleted.

Build/AppVeyor.NUnit.Tests.ps1

Lines changed: 0 additions & 9 deletions
This file was deleted.

Build/SetVersion.ps1

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Param(
2+
[Parameter(Mandatory=$true)][string]$path,
3+
[Parameter(Mandatory=$true)][string]$version
4+
)
5+
6+
$ErrorActionPreference = "Stop"
7+
Set-StrictMode -Version Latest
8+
9+
if ($version) {
10+
11+
$xmlPath = Resolve-Path "$path"
12+
13+
$xml = [XML](Get-Content "$xmlPath")
14+
$xml.PreserveWhitespace = $true
15+
$save = $false
16+
17+
$xPath = "//PropertyGroup/Version"
18+
$nodes = $xml.SelectNodes($xPath)
19+
foreach($node in $nodes) {
20+
$node.InnerXml = $version
21+
$save = $true
22+
}
23+
24+
if ($save) {
25+
Write-Host "Patched $xmlPath"
26+
$xml.Save($xmlPath)
27+
}
28+
}

Build/linq2db.Default.props

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>1.0.1</Version>
4-
<PackageVersion>1.0.1</PackageVersion>
3+
<Version>2.0.1</Version>
54

65
<Description>Allows to execute Linq to DB (linq2db) queries in Entity Framework Core DbContext.</Description>
76
<Title>Linq to DB (linq2db) extensions for Entity Framework Core</Title>
87
<AssemblyTitle>$(Title)</AssemblyTitle>
98
<Authors>Svyatoslav Danyliv, Igor Tkachev, Dmitry Lukashenko, Ilya Chudin</Authors>
109
<Product>Linq to DB</Product>
1110
<Company>linq2db.net</Company>
12-
<Copyright>2002-2018 linq2db.net</Copyright>
11+
<Copyright>2002-2020 linq2db.net</Copyright>
1312
<RepositoryUrl>https://github.com/linq2db/linq2db.EntityFrameworkCore</RepositoryUrl>
1413
<RepositoryType>git</RepositoryType>
15-
<PackageIconUrl>http://www.gravatar.com/avatar/fc2e509b6ed116b9aa29a7988fdb8990?s=320</PackageIconUrl>
1614

1715
<AppDesignerFolder>Properties</AppDesignerFolder>
18-
<LangVersion>latest</LangVersion>
16+
<LangVersion>8.0</LangVersion>
17+
<Nullable>disable</Nullable>
1918
<WarningLevel>4</WarningLevel>
2019
<ErrorReport>prompt</ErrorReport>
21-
<NoWarn>1701;1702;1705;1591</NoWarn>
20+
<NoWarn>1701;1591</NoWarn>
2221

23-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
22+
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
2423
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
2524
<SignAssembly>True</SignAssembly>
26-
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
27-
<AssemblyOriginatorKeyFile Condition="Exists('..\Build\linq2db.snk')">..\Build\linq2db.snk</AssemblyOriginatorKeyFile>
28-
<AssemblyOriginatorKeyFile Condition="Exists('..\..\Build\linq2db.snk')">..\..\Build\linq2db.snk</AssemblyOriginatorKeyFile>
25+
<AssemblyOriginatorKeyFile>..\..\Build\linq2db.snk</AssemblyOriginatorKeyFile>
2926
<DelaySign>False</DelaySign>
3027

3128
<GenerateAssemblyTitleAttribute>true</GenerateAssemblyTitleAttribute>

NuGet/BuildNuspecs.ps1

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Param(
2+
[Parameter(Mandatory=$true)][string]$path,
3+
[Parameter(Mandatory=$true)][string]$version,
4+
[Parameter(Mandatory=$false)][string]$branch
5+
)
6+
7+
$ErrorActionPreference = "Stop"
8+
Set-StrictMode -Version Latest
9+
10+
if ($version) {
11+
12+
$nsUri = 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd'
13+
$ns = @{ns=$nsUri}
14+
$commit = (git rev-parse HEAD)
15+
if (-not $branch) {
16+
$branch = (git rev-parse --abbrev-ref HEAD)
17+
}
18+
19+
Get-ChildItem $path | ForEach {
20+
$xmlPath = Resolve-Path $_.FullName
21+
22+
$xml = [xml] (Get-Content "$xmlPath")
23+
$xml.PreserveWhitespace = $true
24+
25+
# set version metadata
26+
$child = $xml.CreateElement('version', $nsUri)
27+
$child.InnerText = $version
28+
$xml.package.metadata.AppendChild($child)
29+
30+
# set repository/commit link
31+
$child = $xml.CreateElement('repository', $nsUri)
32+
$attr = $xml.CreateAttribute('type')
33+
$attr.Value = 'git'
34+
$child.Attributes.Append($attr)
35+
$attr = $xml.CreateAttribute('url')
36+
$attr.Value = 'https://github.com/linq2db/linq2db.EntityFrameworkCore.git'
37+
$child.Attributes.Append($attr)
38+
$attr = $xml.CreateAttribute('branch')
39+
$attr.Value = $branch
40+
$child.Attributes.Append($attr)
41+
$attr = $xml.CreateAttribute('commit')
42+
$attr.Value = $commit
43+
$child.Attributes.Append($attr)
44+
$xml.package.metadata.AppendChild($child)
45+
46+
$xml.Save($xmlPath)
47+
}
48+
}

NuGet/icon.png

3.44 KB
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3+
<metadata>
4+
<id>linq2db.EntityFrameworkCore</id>
5+
<title>Linq to DB (linq2db) extensions for Entity Framework Core</title>
6+
<authors>Igor Tkachev, Ilya Chudin, Svyatoslav Danyliv, Dmitry Lukashenko</authors>
7+
<owners>Igor Tkachev, Ilya Chudin, Svyatoslav Danyliv, Dmitry Lukashenko</owners>
8+
<copyright>Copyright © 2020 Igor Tkachev, Ilya Chudin, Svyatoslav Danyliv, Dmitry Lukashenko</copyright>
9+
<description>Allows to execute Linq to DB (linq2db) queries in Entity Framework Core DbContext.</description>
10+
<summary />
11+
<tags>linq linq2db LinqToDB ORM database entity-framework-core EntityFrameworkCore EFCore DB SQL SqlServer SqlCe SqlServerCe MySql Firebird SQLite Oracle ODP PostgreSQL DB2</tags>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<icon>images\icon.png</icon>
14+
<projectUrl>https://github.com/linq2db/linq2db.EntityFrameworkCore</projectUrl>
15+
<license type="file">MIT-LICENSE.txt</license>
16+
<dependencies>
17+
<group targetFramework=".NETStandard2.1">
18+
<dependency id="Microsoft.EntityFrameworkCore.Relational" version="3.0.0" />
19+
<dependency id="linq2db" version="2.9.5" />
20+
</group>
21+
</dependencies>
22+
</metadata>
23+
24+
<files>
25+
<file src="..\Source\LinqToDB.EntityFrameworkCore\bin\Release\**\linq2db.EntityFrameworkCore.pdb" target="lib\" />
26+
<file src="..\Source\LinqToDB.EntityFrameworkCore\bin\Release\**\linq2db.EntityFrameworkCore.xml" target="lib\" />
27+
<file src="..\Source\LinqToDB.EntityFrameworkCore\bin\Release\**\linq2db.EntityFrameworkCore.dll" target="lib\" />
28+
29+
<file src="..\MIT-LICENSE.txt" />
30+
31+
<file src="icon.png" target="images\icon.png" />
32+
</files>
33+
</package>

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1+
2+
13
# linq2db.EntityFrameworkCore
24

35
`linq2db.EntityFrameworkCore` is an integration of `LINQ To DB` with existing EntityFrameworkCore projects. It was inspired by [this issue](https://github.com/aspnet/EntityFrameworkCore/issues/11657) in EF.Core repository.
46

57
## Build status
68

7-
| |Appveyor|
8-
-----|-------
9-
|master|[![Master](https://ci.appveyor.com/api/projects/status/vmp9pj4gqrch4x3x/branch/master?svg=true)](https://ci.appveyor.com/project/igor-tkachev/linq2db-entityframeworkcore/branch/master)
10-
|latest|[![Latest](https://ci.appveyor.com/api/projects/status/vmp9pj4gqrch4x3x?svg=true)](https://ci.appveyor.com/project/igor-tkachev/linq2db-entityframeworkcore)
9+
[![Azure DevOps builds](https://img.shields.io/azure-devops/build/linq2db/0dcc414b-ea54-451e-a54f-d63f05367c4b/7)](https://dev.azure.com/linq2db/linq2db/_build?definitionId=7)
1110

1211
## Feeds
1312

1413
* NuGet [![NuGet](https://img.shields.io/nuget/vpre/linq2db.EntityFrameworkCore.svg)](https://www.nuget.org/packages/linq2db.EntityFrameworkCore)
15-
* MyGet [![MyGet](https://img.shields.io/myget/linq2db/vpre/linq2db.EntityFrameworkCore.svg)](https://www.myget.org/feed/linq2db/package/nuget/linq2db.EntityFrameworkCore)
16-
* V2 `https://www.myget.org/F/linq2db/api/v2`
17-
* V3 `https://www.myget.org/F/linq2db/api/v3/index.json`
14+
* Azure Artifacts [![MyGet](https://img.shields.io/badge/azure-download-yellowgreen)](https://dev.azure.com/linq2db/linq2db/_packaging?_a=package&feed=linq2db&view=versions&package=linq2db.EntityFrameworkCore&protocolType=NuGet)
1815

1916
# How to use
2017

@@ -130,7 +127,7 @@ There are many reasons. Some of them:
130127

131128
# Current status
132129

133-
Right now it is an early preview. Below is a list of providers, that should work right now:
130+
Below is a list of providers, that should work right now:
134131

135132
- SQL Server
136133
- MySQL (including Devart and Pomelo providers)

Source/LinqToDB.EntityFrameworkCore/EFCoreMetadataReader.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public T[] GetAttributes<T>(Type type, bool inherit = true) where T : Attribute
5959
return Array.Empty<T>();
6060
}
6161

62+
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "EF1001:Internal EF Core API usage.", Justification = "<Pending>")]
6263
public T[] GetAttributes<T>(Type type, MemberInfo memberInfo, bool inherit = true) where T : Attribute
6364
{
6465
if (typeof(Expression).IsSameOrParentOf(type))

Source/LinqToDB.EntityFrameworkCore/LinqToDBForEFTools.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ static LinqToDBForEFTools()
119119
/// </summary>
120120
/// <param name="model">EF.Core data model instance. Could be <c>null</c>.</param>
121121
/// <param name="dependencies"></param>
122+
/// <param name="mappingSource"></param>
122123
/// <returns>LINQ To DB metadata provider.</returns>
123124
public static IMetadataReader GetMetadataReader([JetBrains.Annotations.CanBeNull] IModel model,
124125
RelationalSqlTranslatingExpressionVisitorDependencies dependencies, IRelationalTypeMappingSource mappingSource)

0 commit comments

Comments
 (0)