Skip to content

Instantly share code, notes, and snippets.

keep goin

Jack Jack85

keep goin
  • Vienna, Austria, Europe
Block or report user

Report or block Jack85

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Jack85 / startup.cs
Last active Mar 18, 2019
.net startup singleton
View startup.cs
services.AddDbContextPool<dbContext>(options => options.UseSqlite(conn));
//with scoped
//with singleton
// services.AddSingleton<DmServices>(s =>
// new DmServices(new ProsperusContext(
// new DbContextOptionsBuilder<dbContext>().UseSqlite(conn).Options)));
services.AddSingleton<DmServices>(s =>
View mvc frombody convention
View gist:c9052f882e6227e1feac449aeb9aa4ce
dotnet core 2.1,
please use
alternative tools or
View ts test
groupBy(array: any[], property: string) {
return array.reduce((prev, next) => {
// If the group doesn't exist, create it
if(!prev[property]) { prev[property] = [next]; }
// Else, we push it in
else { prev[property].push(next); }
// Mandatory return
return prev;
}, {});
You can’t perform that action at this time.