Monday, August 20, 2018

Generate SQL Scripts for the Migration - .Net Core Entity FrameWork


Script-Migration command helps to generate the SQL Scripts (for code first model) that can be run directly from SQL Server Management Studio

Syntax:

SYNTAX
    Script-Migration [-From] <String> [-To] <String> [-Idempotent] [-Context <String>] [-Environment <String>] [-Project <String>] [-StartupProject <String>] [<CommonParameters>]


Example:

Script-Migration -from "20180523175151_InsertComponentType" -to "20180604012237_OPIDTableInsert"

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...