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
David Fowler 🇧🇧🇺🇸💉💉💉 on Twitter: "If you are queuing background jobs/work items today in your .NET applications, how are you doing it and what are you using it for? #dotnet #aspnetcore" / Twitter | |
https://twitter.com/davidfowl/status/1442566223099666436 | |
Background tasks with hosted services in ASP.NET Core | Microsoft Docs | |
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-6.0&tabs=visual-studio | |
Messaging that just works — RabbitMQ | |
https://www.rabbitmq.com/ | |
.NET/C# Client API Guide — RabbitMQ |
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
█C:\git\temp\Maui█ dotnet workload install maui | |
Updated advertising manifest microsoft.net.workload.mono.toolchain. | |
Updated advertising manifest microsoft.net.sdk.tvos. | |
Updated advertising manifest microsoft.net.sdk.macos. | |
Updated advertising manifest microsoft.net.sdk.maccatalyst. | |
Updated advertising manifest microsoft.net.sdk.maui. | |
Updated advertising manifest microsoft.net.workload.emscripten. | |
Updated advertising manifest microsoft.net.sdk.android. | |
Updated advertising manifest microsoft.net.sdk.ios. |
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
lerna init | |
$lernajson = Get-Content lerna.json -Raw | ConvertFrom-Json | |
Add-Member -InputObject $lernajson -Name "npmClient" -Value "yarn" -MemberType NoteProperty; | |
$lernajson | ConvertTo-Json | Set-Content ".\lerna.json"; | |
mkdir packages | |
cd .\packages | |
mkdir app | |
cd app | |
yarn init -y | |
@" |
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 { createLogic } from 'redux-logic'; | |
import * as actionTypes from './constants'; | |
import {loadInitiation, loadSuccess, loadFailure, loadCancel} from './actionCreators'; | |
const url = 'https://raw.githubusercontent.com/RyanCCollins/scalable-react-ts-boilerplate/master/README.md'; | |
//This logic fails. | |
export const fetchLogic = createLogic({ | |
type: actionTypes.LOAD_INTIATION, | |
cancelType: actionTypes.LOAD_CANCEL, |
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.Linq; | |
namespace ConsoleApplication1 | |
{ | |
class App | |
{ | |
public List<List<Item>> Nodes { get; set; } | |
public Item Head { get; set; } |
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; | |
namespace KaggleConsoleApplication | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int total=0; |
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 class Command : IRequest | |
{ | |
private MyDbContext MyDbContext { get; } | |
public Command(MyDbContext aMyDbContext) | |
{ | |
MyDbContext = aMyDbContext; | |
} | |
public int ProjectId { get; set; } |
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 CreateProject() | |
{ | |
var createProjectCommand = Resolve<Create.Command>(); | |
createProjectCommand.Description = "Description"; | |
Create.Result result = Send(createProjectCommand); | |
var project = Query(aDbContext => aDbContext.Projects.Find(result.ProjectId)); | |
project.Description.ShouldEqual(createProjectCommand.Description); | |
} |
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
namespace Feature.Project | |
public class Create | |
{ | |
... | |
public class Result | |
{ | |
private Project Project{ get; } | |
public Result(Project aProject) | |
{ |
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
... | |
if (allEntitiesAttribute != null) | |
{ | |
var dbContext = new MyDbContext(); | |
return ((IObjectContextAdapter)dbContext) | |
.ObjectContext | |
.MetadataWorkspace | |
.GetItems<EntityType>(DataSpace.OSpace) | |
.Select(e => Type.GetType(e.FullName)) |