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 record OperationResult<TResult> | |
{ | |
public TResult? Response { get; private set; } | |
public bool Success { get; private set; } | |
public string? ErrorMessage { get; private set; } | |
public Exception? Exception { get; private set; } | |
public static OperationResult<TResult> BuildSuccess(TResult result) | |
{ |
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 record OperationResult<TResult> | |
{ | |
public TResult? Response { get; private set; } | |
public bool Success { get; private set; } | |
public string? ErrorMessage { get; private set; } | |
public Exception? Exception { get; private set; } | |
public static OperationResult<TResult> BuildSuccess(TResult result) | |
{ |
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
private Marten.StoreOptions BuildStoreOptions() | |
{ | |
var connectionString = Configuration.GetConnectionString("Marten"); | |
var options = new Marten.StoreOptions(); | |
options.Connection(connectionString); | |
options.AutoCreateSchemaObjects = AutoCreate.CreateOrUpdate; | |
return options; | |
} |
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
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=1234@Abcd" -p 1500:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2019-latest | |
docker exec -it sql1 "bash" | |
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "1234@Abcd" |
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
docker run -m=4g -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=1234@Abcd" -p 1433:1433 --name sql2 -h sql2 -d mcr.microsoft.com/mssql/server:2019-latest | |
docker exec -it sql2 "bash" | |
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "1234@Abcd" | |
sqlcmd -S 127.0.0.1,1434 -U SA -P "1234@Abcd" |
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
[Route("api/user/roles")] | |
public IActionResult UserRoles() | |
{ | |
var q1 = from userRole in _shopDbContext.UserRoles | |
join role in _shopDbContext.Roles on userRole.RoleId equals role.Id | |
join user in _shopDbContext.Users on userRole.UserId equals user.Id | |
select new | |
{ | |
user.Id, | |
user.FirstName, |
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
[ | |
"That code seemed so simple I didn't think it needed testing", | |
"That isn't covered by my job description", | |
"I can't test everything", | |
"That's not a bug it's a configuration issue", | |
"That wasn't in the original specification", | |
"It's just some unlucky coincidence", | |
"Oh, you said you DIDN'T want that to happen?", | |
"There were too many developers working on that same thing", | |
"I have too many other high priority things to do right now", |
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
"Tye": { | |
"commandName": "Executable", | |
"executablePath": "tye", | |
"commandLineArgs": "run", | |
"workingDirectory": "$(SolutionDir)", | |
"launchBrowser": true, | |
"launchUrl": "https://localhost:5001;http://localhost:5000", | |
"environmentVariables": { | |
"ASPNETCORE_ENVIRONMENT": "Development", | |
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" |
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
"Watch": { | |
"commandName": "Executable", | |
"executablePath": "dotnet.exe", | |
"workingDirectory": "$(ProjectDir)", | |
"commandLineArgs": "watch run", | |
"launchBrowser": true, | |
"launchUrl": "https://localhost:5001;http://localhost:5000", | |
"environmentVariables": { | |
"ASPNETCORE_ENVIRONMENT": "Development", | |
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" |
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
import turtle | |
t=turtle.getturtle() | |
t.speed(100) | |
t.fillcolor("yellow") | |
t.begin_fill() | |
t.pensize(5) | |
t.pencolor("black") |
NewerOlder