Skip to content

Commit cf59ed1

Browse files
fix linter
1 parent 3c4e903 commit cf59ed1

File tree

20 files changed

+60
-64
lines changed

20 files changed

+60
-64
lines changed

examples/EntityFrameworkCore.Ydb.Samples/Database.Operations.Tutorial/Database.Operations.Tutorial.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>Section_3.ProjectEF</RootNamespace>
8+
<RootNamespace>Database.Operations.Tutorial</RootNamespace>
99
</PropertyGroup>
1010

1111
<ItemGroup>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Section_3.ProjectEF;
1+
namespace Database.Operations.Tutorial;
22

33
public class Department
44
{
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
namespace Section_3.ProjectEF;
1+
namespace Database.Operations.Tutorial;
22

33
public class Employee
44
{
55
public int Id { get; set; }
6-
public required string FirstName { get; set; }
7-
public required string LastName { get; set; }
6+
public required string FirstName { get; set; }
7+
public required string LastName { get; set; }
88
public required decimal Salary { get; set; }
99
public required DateTime JoinedDate { get; set; }
10-
10+
1111
// Foreign key property to the Department
12-
public int DepartmentId { get; set; }
12+
public int DepartmentId { get; set; }
1313

1414
// Reference navigation to Department
1515
public Department Department { get; set; } = null!;
1616

1717
// Reference navigation to EmployeeProfile
18-
public EmployeeProfile? Profile { get; set; }
18+
public EmployeeProfile? Profile { get; set; }
1919

2020
// collection navigation to Employee
2121
public List<Skill> Skills { get; set; } = new();
22-
}
22+
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
namespace Section_3.ProjectEF;
1+
namespace Database.Operations.Tutorial;
22

33
public class EmployeeProfile
44
{
5-
public int Id { get; set;}
6-
public string Phone { get;set; }
7-
public string Email { get;set; }
5+
public int Id { get; set; }
6+
public string Phone { get; set; }
7+
public string Email { get; set; }
88

9-
public int EmployeeId { get; set;}
10-
public Employee Employee { get; set;} = null!;
11-
}
9+
public int EmployeeId { get; set; }
10+
public Employee Employee { get; set; } = null!;
11+
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
using Microsoft.EntityFrameworkCore.Diagnostics;
44
using Microsoft.Extensions.Configuration;
55

6-
namespace Section_3.ProjectEF;
6+
namespace Database.Operations.Tutorial;
77

88
public class HRContext : DbContext
99
{
1010
public DbSet<Employee> Employees { get; set; }
11-
public DbSet<Department> Departments { get; set; }
12-
public DbSet<EmployeeProfile> EmployeeProfiles { get; set; }
11+
public DbSet<Department> Departments { get; set; }
12+
public DbSet<EmployeeProfile> EmployeeProfiles { get; set; }
1313
public DbSet<Skill> Skills { get; set; }
1414

1515
public HRContext()
@@ -28,9 +28,9 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
2828
.Build();
2929

3030
var connectionString = configuration.GetConnectionString("Local");
31-
31+
3232
optionsBuilder.UseYdb(connectionString)
33-
.ConfigureWarnings(warnings => warnings.Ignore(RelationalEventId.PendingModelChangesWarning))
34-
.EnableSensitiveDataLogging();
33+
.ConfigureWarnings(warnings => warnings.Ignore(RelationalEventId.PendingModelChangesWarning))
34+
.EnableSensitiveDataLogging();
3535
}
3636
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Microsoft.EntityFrameworkCore.Diagnostics;
55
using Microsoft.Extensions.Configuration;
66

7-
namespace Section_3.ProjectEF;
7+
namespace Database.Operations.Tutorial;
88

99
internal class HRContextFactory : IDesignTimeDbContextFactory<HRContext>
1010
{

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
using Microsoft.EntityFrameworkCore;
2-
using Section_3.ProjectEF;
2+
using Database.Operations.Tutorial;
33

44
var orderingActions = new List<Action>
55
{
66
Action.ReadCsv,
7-
Action.Select,
7+
Action.Select,
88
Action.OrderBy,
99
Action.QueryLinq,
1010
Action.Where,
@@ -36,7 +36,7 @@
3636
actions[result](hrContext);
3737
break;
3838
}
39-
39+
4040
throw new InvalidOperationException("Not found argument: " + args[0]);
4141
}
4242
case 0:
@@ -537,4 +537,4 @@ internal enum Action
537537
Like,
538538
InnerJoin,
539539
GroupBy
540-
}
540+
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
namespace Section_3.ProjectEF;
1+
namespace Database.Operations.Tutorial;
2+
23
public class Skill
34
{
4-
public int Id { get; set; }
5-
public required string Title { get;set; }
5+
public int Id { get; set; }
6+
public required string Title { get; set; }
67

78
// collection navigation to Employee
89
public List<Employee> Employees { get; set; } = new();
9-
}
10+
}

examples/EntityFrameworkCore.Ydb.Samples/Schema.ManyToMany/HRContext.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
// using Microsoft.EntityFrameworkCore;
2-
31
using EntityFrameworkCore.Ydb.Extensions;
4-
using ManyToMany;
52
using Microsoft.EntityFrameworkCore;
63
using Microsoft.EntityFrameworkCore.Design;
74
using Microsoft.EntityFrameworkCore.Diagnostics;
85

9-
namespace Section_2.ManyToMany;
6+
namespace Schema.ManyToMany;
107

118
public class HRContext(DbContextOptions<HRContext> options) : DbContext(options)
129
{

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ManyToMany;
1+
namespace Schema.ManyToMany;
22

33
public class Department
44
{
@@ -12,39 +12,39 @@ 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
// collection navigation to Employee
2828
public List<Skill> Skills { get; set; } = new();
2929
}
3030

3131
public class EmployeeProfile
3232
{
33-
public int Id { get; set;}
34-
public string Phone { get;set; }
35-
public string Email { get;set; }
33+
public int Id { get; set; }
34+
public string Phone { get; set; }
35+
public string Email { get; set; }
3636

3737
// Required foreign key property
38-
public int EmployeeId { get; set;}
39-
38+
public int EmployeeId { get; set; }
39+
4040
// Required reference navigation to Employee
41-
public Employee Employee { get; set;} = null!;
41+
public Employee Employee { get; set; } = null!;
4242
}
4343

4444
public class Skill
4545
{
46-
public int Id { get; set; }
47-
public required string Title { get;set; }
46+
public int Id { get; set; }
47+
public required string Title { get; set; }
4848

4949
// collection navigation to Employee
5050
public List<Employee> Employees { get; set; } = new();

0 commit comments

Comments
 (0)