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 DummyDatabaseTest : DbTest | |
{ | |
[Fact] | |
void when_the_thing_is_tested_then_we_are_happy() | |
{ | |
Session.Query<User>() | |
.Any(x => x.IsActive) | |
.ShouldBeTrue(); | |
} | |
} |
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 Coravel; | |
using Coravel.Scheduling.Schedule.Interfaces; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using Microsoft.Owin; | |
using Owin; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; |
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 Query | |
{ | |
private readonly string _connectionString; | |
public Query(string connectionString) | |
{ | |
this._connectionString = connectionString; | |
} | |
public async Task<T> UsingConnectionAsync<T>(Func<SqlConnection, Task<T>> func) |
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
export default (constructor: any) => { | |
const functionString = constructor.toString(); | |
const params = GetArgumentNames(functionString); | |
const newConstructor: any = function (...args) { | |
const newObj = new constructor(args); | |
params.map((param, index) => newObj[param] = args[index]); | |
return newObj; | |
} |