var builder = new DbContextOptionsBuilder().UseInMemoryDatabase();
var context = new MyContext(builder.Options); var users = Enumerable.Range(1, 10).Select(i => new User { Id = i }); context.Users.AddRange(users); context.SaveChanges();
public class HttpClientAbstraction : IHttpClientAbstraction | |
{ | |
public static HttpClient Client = new HttpClient(); | |
public async Task<Result<T>> GetUrlAsync<T>(string url) | |
{ | |
return await ExecuteAsync<T>(() => Client.GetAsync(url), url); | |
} | |
public async Task<Result<T, TT>> GetUrlAsync<T, TT>(string url) | |
{ | |
return await ExecuteAsync<T, TT>(() => Client.GetAsync(url), url); |
using Newtonsoft.Json; | |
using System; | |
namespace Core | |
{ | |
public class Result | |
{ | |
public bool Ok { get; set; } | |
public string Message { get; set; } |
import random | |
import decimal | |
cost = 0.10 | |
sending_amount = 0.71 | |
class UTXO(object): | |
id = 0 | |
amount = 0 |
Verifying my Blockstack ID is secured with the address 14gciAJG7MMXuNM2ruEzQtFrbKoxEE261W https://explorer.blockstack.org/address/14gciAJG7MMXuNM2ruEzQtFrbKoxEE261W |
root=true | |
[*] | |
indent_style = tab | |
indent_size = 4 | |
[*.cs] | |
# Don't use 'this.'/'Me.' prefix for anything | |
dotnet_style_qualification_for_field = false:error | |
dotnet_style_qualification_for_property = false:error |
var builder = new DbContextOptionsBuilder().UseInMemoryDatabase();
var context = new MyContext(builder.Options); var users = Enumerable.Range(1, 10).Select(i => new User { Id = i }); context.Users.AddRange(users); context.SaveChanges();
detroitpro@build:/etc/supervisor/conf.d$ cat teamvirtuoso.conf | |
[program:tv] | |
command=/usr/bin/dotnet /var/www/teamvirtuoso.com/teamvirtuoso.dll | |
directory=/var/www/teamvirtuoso.com/ | |
autostart=true | |
autorestart=true | |
stderr_logfile=/var/log/tv.err.log | |
stdout_logfile=/var/log/tv.out.log | |
environment=ASPNETCORE_ENVIRONMENT=Production | |
user=detroitpro |
I hereby claim:
To claim this, I am signing this object:
For many .NET developers, Linux can seem like an alternate dimension. There are, however, many reason why you may want to deploy to linux and/or use MS SQL on Linux. During this talk we'll discuss the intricacies of running a complete non-windows stack. We will walk through all the decisions we made deploying our first “Linux first” web application, from what version of Linux (and why) to lessons learned while deploying and pointers on getting started today!
Eric is one of the founding members of TeamVirtuoso, a software consulting company based out of southeast Michigan. We are an agile team that prides itself on building software the right way. Before starting TeamVirtuoso, Eric worked for over 10 years as a software consultant, specializing in the Microsoft tech stack.
namespace My.Common | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
public static class AsyncHelpers | |
{ | |
/// <summary> |