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
-- STEP 1 : Change name of existing tables | |
EXEC sp_rename 'AspNetRoles', 'AspNetRoles_old'; | |
EXEC sp_rename 'AspNetUserClaims', 'AspNetUserClaims_old'; | |
EXEC sp_rename 'AspNetUserLogins', 'AspNetUserLogins_old'; | |
EXEC sp_rename 'AspNetUserRoles', 'AspNetUserRoles_old'; | |
EXEC sp_rename 'AspNetUsers', 'AspNetUsers_old'; | |
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
# ------------------------------------------------------------------------------ | |
# 1. To build all .net core projects in a solution use below pipeline code | |
# ------------------------------------------------------------------------------ | |
trigger: | |
- master | |
pool: | |
vmImage: 'ubuntu-latest' |
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 System; | |
using System.Text; | |
using System.Net.Http; | |
using Newtonsoft.Json; | |
using System.Collections.Generic; | |
using System.Web.Script.Serialization; | |
namespace ConsoleApp14 | |
{ | |
class Program |
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
# Login | |
Login-AzureRmAccount | |
# Set subscription to create resources in | |
Set-AzureRmContext -SubscriptionId "xxxxxxxxx" | |
# Variables for common values | |
$location = "westeurope" | |
$resourceGroup = "demo-resgroup-0" | |
$vmName = "demovm-0" |
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
# Login | |
Login-AzureRmAccount | |
# Variables for common values | |
$location = "westeurope" | |
$resourceGroup = "demo-resgroup-0" | |
$vmName = "demovm-0" | |
$publicIP = "spublicip-1" | |
$subnet = "subnet-1" | |
$vnet = "vnet-1" |
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
{ | |
"Version": 1.0, | |
"Codecs": [ | |
{ | |
"KeyFrameInterval": "00:00:02", | |
"H264Layers": [ | |
{ | |
"Profile": "Auto", | |
"Level": "auto", | |
"Bitrate": 1000, |
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
static public IAsset EncodeToAdaptiveBitrateMP4s(IAsset asset, AssetCreationOptions options) | |
{ | |
// Default preset settings | |
//IJob job = _context.Jobs.CreateWithSingleTask(MediaProcessorNames.AzureMediaEncoder, | |
// MediaEncoderTaskPresetStrings.H264AdaptiveBitrateMP4Set720p, | |
// asset, | |
// "Test-Video-" + 100 + "-" + Guid.NewGuid().ToString() + "-Adaptive-Bitrate-MP4", | |
// AssetCreationOptions.None); | |
// Custom preset settings |
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
namespace ConsoleApplication6 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
List<Items> list1 = new List<Items>(); | |
list1.Add(new Items { name = "abc" }); | |
list1.Add(new Items { name = "abd" }); | |
list1.Add(new Items { name = "aef" }); |
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
## 1. Install log4net using NuGet | |
## 2. Add assembly in AssemblyInfo.cs file | |
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Web.config", Watch = true)] | |
## 3. Add settings in web.config | |
<configuration> | |
<configSections> | |
::: | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> |
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
// Entity Framework | |
public ActionResult GetBokaroStudentEF() | |
{ | |
var db = GetFromDbContext(); | |
var data = db.Students.Where(i => i.City == "Bokaro"); | |
return View(data); | |
} | |
// LINQ | |
public ActionResult GetBokaroStudentLINQ() |
NewerOlder