Skip to content

Commit

Permalink
Add more namespaces to global usings
Browse files Browse the repository at this point in the history
  • Loading branch information
i-rakityanskiy committed Jul 6, 2022
1 parent 96718cb commit 49a989a
Show file tree
Hide file tree
Showing 212 changed files with 174 additions and 708 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Runtime.Serialization;

namespace OutOfSchool.Services.Common.Exceptions;
namespace OutOfSchool.Services.Common.Exceptions;

/// <summary>
/// The ImageStorageException is thrown when something has happened while trying
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using Google.Cloud.Storage.V1;

namespace OutOfSchool.Services.Contexts;

public class GcpStorageContext : IGcpStorageContext
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Google.Cloud.Storage.V1;

namespace OutOfSchool.Services.Contexts;

public interface IGcpStorageContext
Expand Down
3 changes: 1 addition & 2 deletions OutOfSchool/OutOfSchool.DataAccess/Contexts/MongoDb.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Options;
using MongoDB.Driver;
using MongoDB.Driver.GridFS;
using OutOfSchool.Services.Contexts.Configuration;
Expand Down
1 change: 0 additions & 1 deletion OutOfSchool/OutOfSchool.DataAccess/Enums/DaysBitMask.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Microsoft.EntityFrameworkCore;
using OutOfSchool.Services.Models;

namespace OutOfSchool.Services.Extensions;
namespace OutOfSchool.Services.Extensions;

public static class DbContextExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;

#nullable enable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Microsoft.EntityFrameworkCore;
using OutOfSchool.Common.PermissionsModule;
using OutOfSchool.Services.Enums;
using OutOfSchool.Services.Models;
using OutOfSchool.Common.PermissionsModule;

namespace OutOfSchool.Services.Extensions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Linq;

namespace OutOfSchool.Services.Extensions;
namespace OutOfSchool.Services.Extensions;

public static class QueryableExtensions
{
Expand Down
15 changes: 15 additions & 0 deletions OutOfSchool/OutOfSchool.DataAccess/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
global using System;
global using System.Collections.Generic;
global using System.ComponentModel.DataAnnotations;
global using System.ComponentModel.DataAnnotations.Schema;
global using System.Linq;
global using System.Linq.Expressions;
global using System.Runtime.Serialization;
global using System.Threading.Tasks;
global using Google.Cloud.Storage.V1;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Metadata.Builders;
global using OutOfSchool.Common;
global using OutOfSchool.Common.Enums;
global using OutOfSchool.Services.Enums;
global using OutOfSchool.Services.Models;
2 changes: 0 additions & 2 deletions OutOfSchool/OutOfSchool.DataAccess/IUnitOfWork.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Threading.Tasks;

namespace OutOfSchool.Services;

public interface IUnitOfWork
Expand Down
7 changes: 1 addition & 6 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Achievement.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class Achievement : IKeyedEntity<Guid>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class AchievementTeacher : IKeyedEntity<long>
{
Expand Down
4 changes: 1 addition & 3 deletions OutOfSchool/OutOfSchool.DataAccess/Models/AchievementType.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class AchievementType : IKeyedEntity<long>
{
Expand Down
5 changes: 1 addition & 4 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Address.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.ComponentModel.DataAnnotations;
using H3Lib;
using H3Lib;
using H3Lib.Extensions;
using OutOfSchool.Common;

namespace OutOfSchool.Services.Models;

Expand Down
6 changes: 1 addition & 5 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Application.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using OutOfSchool.Services.Enums;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class Application : IKeyedEntity<Guid>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class BlockedProviderParent : IKeyedEntity<Guid>
{
Expand Down
5 changes: 1 addition & 4 deletions OutOfSchool/OutOfSchool.DataAccess/Models/ChangesLog.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class ChangesLog : IKeyedEntity<long>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models.ChatWorkshop;
namespace OutOfSchool.Services.Models.ChatWorkshop;

public class ChatMessageWorkshop
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models.ChatWorkshop;
namespace OutOfSchool.Services.Models.ChatWorkshop;

public class ChatRoomWorkshop
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace OutOfSchool.Services.Models.ChatWorkshop;
namespace OutOfSchool.Services.Models.ChatWorkshop;

public class ChatMessageInfoForChatList
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace OutOfSchool.Services.Models.ChatWorkshop;
namespace OutOfSchool.Services.Models.ChatWorkshop;

public class ChatRoomWorkshopForChatList
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace OutOfSchool.Services.Models.ChatWorkshop;
namespace OutOfSchool.Services.Models.ChatWorkshop;

public class ParentInfoForChatList
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace OutOfSchool.Services.Models.ChatWorkshop;
namespace OutOfSchool.Services.Models.ChatWorkshop;

public class WorkshopInfoForChatList
{
Expand Down
6 changes: 1 addition & 5 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Child.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using OutOfSchool.Services.Enums;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class Child : IKeyedEntity<Guid>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class ChildSocialGroup
{
Expand Down
4 changes: 1 addition & 3 deletions OutOfSchool/OutOfSchool.DataAccess/Models/City.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class City : IKeyedEntity<long>
{
Expand Down
4 changes: 1 addition & 3 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Class.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class Class : IKeyedEntity<long>
{
Expand Down
5 changes: 1 addition & 4 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Codeficator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class Codeficator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using OutOfSchool.Services.Enums;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class CompanyInformation : IKeyedEntity<Guid>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class CompanyInformationItem : IKeyedEntity<Guid>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace OutOfSchool.Services.Models.Configurations;
namespace OutOfSchool.Services.Models.Configurations;

internal class AchievementConfiguration : IEntityTypeConfiguration<Achievement>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using OutOfSchool.Services.Enums;

namespace OutOfSchool.Services.Models.Configurations;
namespace OutOfSchool.Services.Models.Configurations;

internal class ApplicationConfiguration : IEntityTypeConfiguration<Application>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;


using OutOfSchool.Services.Models.ChatWorkshop;

namespace OutOfSchool.Services.Models.Configurations;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;


using OutOfSchool.Services.Models.ChatWorkshop;

namespace OutOfSchool.Services.Models.Configurations;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;


using OutOfSchool.Services.Common;
using OutOfSchool.Services.Enums;

namespace OutOfSchool.Services.Models.Configurations;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using OutOfSchool.Services.Models.Images;
using OutOfSchool.Services.Models.Images;

namespace OutOfSchool.Services.Models.Configurations.Images;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Newtonsoft.Json;
using Newtonsoft.Json;

namespace OutOfSchool.Services.Models.Configurations;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace OutOfSchool.Services.Models.Configurations;
namespace OutOfSchool.Services.Models.Configurations;

internal class ProviderAdminConfiguration : IEntityTypeConfiguration<ProviderAdmin>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System.ComponentModel.DataAnnotations;

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using OutOfSchool.Services.Enums;

namespace OutOfSchool.Services.Models.Configurations;
namespace OutOfSchool.Services.Models.Configurations;

internal class ProviderConfiguration : IEntityTypeConfiguration<Provider>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;


using OutOfSchool.Services.Common;

namespace OutOfSchool.Services.Models.Configurations;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace OutOfSchool.Services.Models.Configurations;
namespace OutOfSchool.Services.Models.Configurations;

internal class WorkshopConfiguration : IEntityTypeConfiguration<Workshop>
{
Expand Down
5 changes: 0 additions & 5 deletions OutOfSchool/OutOfSchool.DataAccess/Models/DateTimeRange.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
using System;
using System.ComponentModel.DataAnnotations;

using OutOfSchool.Services.Enums;

namespace OutOfSchool.Services.Models;

public class DateTimeRange : IKeyedEntity<long>
Expand Down
5 changes: 1 addition & 4 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Department.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace OutOfSchool.Services.Models;
namespace OutOfSchool.Services.Models;

public class Department : IKeyedEntity<long>
{
Expand Down
4 changes: 1 addition & 3 deletions OutOfSchool/OutOfSchool.DataAccess/Models/Direction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using OutOfSchool.Services.Models.SubordinationStructure;
using OutOfSchool.Services.Models.SubordinationStructure;

namespace OutOfSchool.Services.Models;

Expand Down
Loading

0 comments on commit 49a989a

Please sign in to comment.