This file contains hidden or 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
https://softwareengineering.stackexchange.com/questions/93322/generating-a-class-dynamically-from-types-that-are-fetched-at-runtime |
This file contains hidden or 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
function convertToWCFFormat(date){ | |
return "\/Date(" + date.getTime()+date.getTimezoneOffset() + ")\/"; | |
} | |
function convertToWCFFormatFromStr(date){ | |
let _date=new Date(date); | |
return "\/Date(" + _date.getTime()+_date.getTimezoneOffset() + ")\/"; | |
} |
This file contains hidden or 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
rowanmiller commented on 31 Jul 2015 | |
@sonofsam I think rather than putting the ModelBuilder in DI you want to construct your model and set it on the DbContextOptions that are registered in DI. | |
var builder = new ModelBuilder(); | |
// all the code to configure your model | |
var model = builder.Model; | |
services.AddEntityFramework() | |
.AddSqlServer() | |
.AddDbContext<MyDbContext>(options => |
This file contains hidden or 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 Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.Design.Internal; | |
using Microsoft.EntityFrameworkCore.Infrastructure; | |
using Microsoft.EntityFrameworkCore.Metadata; | |
using Microsoft.EntityFrameworkCore.Migrations; | |
using Microsoft.EntityFrameworkCore.Migrations.Design; | |
using Microsoft.EntityFrameworkCore.Migrations.Operations; | |
using Microsoft.EntityFrameworkCore.Storage; |