Skip to content

Commit fa04c88

Browse files
fix linters
1 parent cf59ed1 commit fa04c88

File tree

15 files changed

+29
-56
lines changed

15 files changed

+29
-56
lines changed

examples/EntityFrameworkCore.Ydb.QuickStart/EntityFrameworkCore.Ydb.QuickStart.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<RootNamespace>EntityFrameworkCore.Ydb</RootNamespace>
8+
<RootNamespace>EntityFrameworkCore.Ydb.QuickStart</RootNamespace>
99
</PropertyGroup>
1010

1111
<ItemGroup>

examples/EntityFrameworkCore.Ydb.QuickStart/Program.cs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,6 @@
2727
db.Remove(blog);
2828
await db.SaveChangesAsync();
2929

30-
var strategy = db.Database.CreateExecutionStrategy();
31-
await strategy.ExecuteAsync(
32-
async () =>
33-
{
34-
await using var context = new BloggingContext();
35-
await using var transaction = await context.Database.BeginTransactionAsync();
36-
37-
context.Blogs.Add(new Blog { Url = "http://blogs.msdn.com/dotnet" });
38-
await context.SaveChangesAsync();
39-
40-
context.Blogs.Add(new Blog { Url = "http://blogs.msdn.com/visualstudio" });
41-
await context.SaveChangesAsync();
42-
43-
await transaction.CommitAsync();
44-
});
45-
// await using var context = new BloggingContext();
46-
// await using var transaction = await context.Database.BeginTransactionAsync();
47-
//
48-
// context.Blogs.Add(new Blog { Url = "http://blogs.msdn.com/dotnet" });
49-
// await context.SaveChangesAsync();
50-
//
51-
// context.Blogs.Add(new Blog { Url = "http://blogs.msdn.com/visualstudio" });
52-
// await context.SaveChangesAsync();
53-
//
54-
// await transaction.CommitAsync();
55-
56-
5730
internal class BloggingContextFactory : IDesignTimeDbContextFactory<BloggingContext>
5831
{
5932
public BloggingContext CreateDbContext(string[] args)

examples/EntityFrameworkCore.Ydb.Samples/AddEntity.Sample/Models.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ namespace Section_1.HR;
33
public class Department
44
{
55
public int Id { get; set; }
6-
public string Name {get; set; }
6+
public string Name { get; set; }
77
}
88

99
public class Employee
1010
{
1111
public int Id { get; set; }
12-
public required string FirstName { get; set; }
13-
public required string LastName { get; set; }
12+
public required string FirstName { get; set; }
13+
public required string LastName { get; set; }
1414
public required DateTime JoinedDate { get; set; }
1515
public required decimal Salary { get; set; }
16-
public Department? Department { get; set; }
16+
public Department? Department { get; set; }
1717
}

examples/EntityFrameworkCore.Ydb.Samples/AddEntity.Sample/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ static void InsertDepartments()
1414
{
1515
new() { Name = "Sales" },
1616
new() { Name = "Marketing" },
17-
new() { Name = "Logistics" },
17+
new() { Name = "Logistics" }
1818
};
1919

2020
using var context = new HRContext();

examples/EntityFrameworkCore.Ydb.Samples/Database.Operations.Tutorial/HRContextFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public HRContext CreateDbContext(string[] args)
1818
.Build();
1919

2020
var connectionString = configuration.GetConnectionString("Local");
21-
21+
2222
// IMPORTANT!
2323
// Disables retries for the migrations context.
2424
// Required because migration operations may use suppressed or explicit transactions,

examples/EntityFrameworkCore.Ydb.Samples/Database.Operations.Tutorial/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static void GroupBy(HRContext context)
6060
.GroupBy(e => e.Department)
6161
.Select(group => new
6262
{
63-
Name = group.Key.Name,
63+
group.Key.Name,
6464
Headcount = group.Count()
6565
})
6666
.OrderBy(dc => dc.Name)
@@ -76,7 +76,7 @@ static void GroupBy(HRContext context)
7676
.GroupBy(e => e.Department)
7777
.Select(group => new
7878
{
79-
Name = group.Key.Name,
79+
group.Key.Name,
8080
Headcount = group.Count()
8181
})
8282
.Where(group => group.Headcount > 11)

examples/EntityFrameworkCore.Ydb.Samples/Schema.OneToOne/Models.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ public class Department
1212
public class Employee
1313
{
1414
public int Id { get; set; }
15-
public required string FirstName { get; set; }
16-
public required string LastName { get; set; }
15+
public required string FirstName { get; set; }
16+
public required string LastName { get; set; }
1717
public required decimal Salary { get; set; }
1818
public required DateTime JoinedDate { get; set; }
19-
public int DepartmentId { get; set; }
19+
public int DepartmentId { get; set; }
2020

2121
// Reference navigation to Department
2222
public Department Department { get; set; } = null!;
2323

2424
// Reference navigation to EmployeeProfile
25-
public EmployeeProfile? Profile { get; set; }
25+
public EmployeeProfile? Profile { get; set; }
2626
}
2727

2828
public class EmployeeProfile
2929
{
30-
public int Id { get; set;}
31-
public string Phone { get;set; }
32-
public string Email { get;set; }
30+
public int Id { get; set; }
31+
public string Phone { get; set; }
32+
public string Email { get; set; }
3333

3434
// Required foreign key property
35-
public int EmployeeId { get; set;}
36-
35+
public int EmployeeId { get; set; }
36+
3737
// Required reference navigation to Employee
38-
public Employee Employee { get; set;} = null!;
38+
public Employee Employee { get; set; } = null!;
3939
}

examples/Ydb.Sdk.AdoNet.Dapper.QuickStart/Ydb.Sdk.AdoNet.Dapper.QuickStart.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<RootNamespace>Dapper</RootNamespace>
8+
<RootNamespace>Ydb.Sdk.AdoNet.Dapper.QuickStart</RootNamespace>
99
</PropertyGroup>
1010

1111
<ItemGroup>

examples/Ydb.Sdk.AdoNet.QuickStart/CmdOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using CommandLine;
22

3-
namespace AdoNet;
3+
namespace Ydb.Sdk.AdoNet.QuickStart;
44

55
internal class CmdOptions
66
{

examples/Ydb.Sdk.AdoNet.QuickStart/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System.Data;
2-
using AdoNet;
32
using CommandLine;
43
using Microsoft.Extensions.Logging;
54
using Polly;
65
using Ydb.Sdk.Ado;
6+
using Ydb.Sdk.AdoNet.QuickStart;
77

88
using var factory = LoggerFactory.Create(builder => builder.AddConsole());
99

0 commit comments

Comments
 (0)