This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace Sample.API.Services | |
{ | |
public interface ISomeWorkService | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.UseRouting(); | |
app.UseAuthorization(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
// Add Hangfire services. | |
services.AddHangfire(configuration => configuration | |
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170) | |
.UseSimpleAssemblyNameTypeSerializer() | |
.UseRecommendedSerializerSettings() | |
.UseSqlServerStorage(Configuration.GetConnectionString("Hangfire"), new SqlServerStorageOptions | |
{ | |
CommandBatchMaxTimeout = TimeSpan.FromMinutes(5), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MediatR; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Users.API.Application.Commands; | |
using Users.API.Application.Queries; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FluentValidation; | |
using Users.API.Application.Commands; | |
namespace Users.API.Application.Validators | |
{ | |
public class CreateUserCommandValidator : AbstractValidator<CreateUserCommand> | |
{ | |
public CreateUserCommandValidator() | |
{ | |
RuleFor(x => x.Email).NotNull().NotEmpty(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This method gets called by the runtime. Use this method to add services to the container. | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services | |
.AddMvc() | |
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2) | |
.AddFluentValidation(fv => fv.RegisterValidatorsFromAssemblyContaining<Startup>()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace ConsoleApp4 | |
{ | |
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
Console.WriteLine(F(21)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ssl_starttls=yes | |
set ssl_force_tls=yes | |
set imap_user = '[email protected]' | |
set imap_pass = 'password_here' | |
set from= $imap_user | |
set use_from=yes | |
set realname='Your_Name' | |
set folder = imaps://imap-mail.outlook.com:993 | |
set spoolfile = "+INBOX" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [Unicorn Paddock] | |
GO | |
/****** Object: StoredProcedure [dbo].[sp_test] Script Date: 21/06/2019 11:57:08 AM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
ALTER PROCEDURE [dbo].[sp_test] | |
AS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Enable RPC calls | |
EXEC sp_serveroption Logging, 'RPC OUT', 'TRUE' | |
-- disable distributed transaction | |
EXEC sp_serveroption Logging, 'remote proc transaction promotion', 'FALSE' |
NewerOlder