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
Clear-Host | |
$module = Get-Module tcdbtools | |
if (!$module) { | |
Install-Module tcdbtools -Force | |
} | |
Import-Module tcdbtools | |
$module = Get-Module SqlServer | |
if (!$module) { | |
Install-Module SqlServer -Force | |
#get-command -Module sqlserver |
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
// note: this interface will be referenced in loaded source code: | |
public interface ICharacter | |
{ | |
int Height { get; } | |
string Language { get; } | |
} | |
public class Human : ICharacter | |
{ | |
public int Height { get { return UnityEngine.Random.Range(150, 200); } } |
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
var id = 1; | |
using (var db = new entityContext()) | |
{ | |
// Select entity | |
var entity = db.dbset.FirstOrDefault(e => e.ID == id); | |
if (entity != null) | |
{ | |
// Remove Entity | |
db.dbset.Remove(entity); | |
db.SaveChanges(); |