Skip to content

Commit

Permalink
To expression bodied methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgi committed Nov 25, 2024
1 parent 98e1466 commit c4f025e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,9 @@ class MySqlExceptionProcessorInterceptor : ExceptionProcessorInterceptor<MySqlEx

public static class ExceptionProcessorExtensions
{
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
{
return self.AddInterceptors(new MySqlExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
=> self.AddInterceptors(new MySqlExceptionProcessorInterceptor());

public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
{
return self.AddInterceptors(new MySqlExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
=> self.AddInterceptors(new MySqlExceptionProcessorInterceptor());
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,9 @@ class OracleExceptionProcessorInterceptor : ExceptionProcessorInterceptor<Oracle

public static class ExceptionProcessorExtensions
{
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
{
return self.AddInterceptors(new OracleExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
=> self.AddInterceptors(new OracleExceptionProcessorInterceptor());

public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self)
where TContext : DbContext
{
return self.AddInterceptors(new OracleExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext =>
self.AddInterceptors(new OracleExceptionProcessorInterceptor());
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ class PostgresExceptionProcessorInterceptor : ExceptionProcessorInterceptor<Post

public static class ExceptionProcessorExtensions
{
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
{
return self.AddInterceptors(new PostgresExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
=> self.AddInterceptors(new PostgresExceptionProcessorInterceptor());

public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
{
return self.AddInterceptors(new PostgresExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
=> self.AddInterceptors(new PostgresExceptionProcessorInterceptor());
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ class SqlServerExceptionProcessorInterceptor: ExceptionProcessorInterceptor<SqlE

public static class ExceptionProcessorExtensions
{
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
{
return self.AddInterceptors(new SqlServerExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
=> self.AddInterceptors(new SqlServerExceptionProcessorInterceptor());

public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
{
return self.AddInterceptors(new SqlServerExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
=> self.AddInterceptors(new SqlServerExceptionProcessorInterceptor());
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ class SqliteExceptionProcessorInterceptor : ExceptionProcessorInterceptor<Sqlite

public static class ExceptionProcessorExtensions
{
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
{
return self.AddInterceptors(new SqliteExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder UseExceptionProcessor(this DbContextOptionsBuilder self)
=> self.AddInterceptors(new SqliteExceptionProcessorInterceptor());

public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
{
return self.AddInterceptors(new SqliteExceptionProcessorInterceptor());
}
public static DbContextOptionsBuilder<TContext> UseExceptionProcessor<TContext>(this DbContextOptionsBuilder<TContext> self) where TContext : DbContext
=> self.AddInterceptors(new SqliteExceptionProcessorInterceptor());
}

0 comments on commit c4f025e

Please sign in to comment.