namespace
s instead of typical namespace
s CS-R1062 7
8#nullable disable
9
10namespace CustomerAPI.Migrations11{
12 [DbContext(typeof(DataContext))]
13 partial class DataContextModelSnapshot : ModelSnapshot
2
3#nullable disable
4
5namespace CustomerAPI.Migrations 6{
7 public partial class CreateInitial : Migration
8 {
8
9#nullable disable
10
11namespace CustomerAPI.Migrations12{
13 [DbContext(typeof(DataContext))]
14 [Migration("20220604151018_CreateInitial")]
1using Microsoft.EntityFrameworkCore;
2
3namespace CustomerAPI.Data 4{
5 public class DataContext : DbContext
6 {
1namespace CustomerAPI 2{
3 public class Customer
4 {
Typical namespace
s require that all the members in it be indented. With the additional of classes, methods, and scopes, the indentation level further increases, thereby affecting the code readability, navigation, and clarity. C# 10 introduces file scoped namespaces that do not require members' indentation. It is therefore recommended that you switch to file scoped namespaces when and where possible.
namespace Foo
{
// ...
}
namespace Foo;
// ...