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
// boom | |
public class Ex | |
{ | |
public static readonly Ex Foo = Parse('f'); | |
public static readonly Ex Bar = Parse('b'); | |
Dictionary<char, string> validValues = new Dictionary<char, string> | |
{ | |
{ 'f', "Foo" }, | |
{ 'b', "Bar" }, |
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
// example: | |
public partial class App : Application | |
{ | |
protected override void OnStartup(StartupEventArgs e) | |
{ | |
BindingErrors.Throw(); | |
// app gubbins here | |
} | |
} |
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
Fluent Mappings | |
--------------- | |
Types discovered: | |
EmployeeMap | Examples.FirstProject.Mappings.EmployeeMap, Examples.FirstProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
LocationMap | Examples.FirstProject.Mappings.LocationMap, Examples.FirstProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
ProductMap | Examples.FirstProject.Mappings.ProductMap, Examples.FirstProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | |
StoreMap | Examples.FirstProject.Mappings.StoreMap, Examples.FirstProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
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
Is there any common name for all these types? | |
string | |
char | |
int | |
long | |
short | |
double | |
float | |
byte |
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
MANY-TO-MANY | |
create table Left ( | |
Id integer | |
Name TEXT | |
) | |
create table LeftRights ( | |
LeftId INTEGER not null, | |
Key TEXT not null, |
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
<map name="Units"> | |
<key column="ProductId"/> | |
<index column="UnitName" type="string"/> | |
<many-to-many class="Unit" column="UnitId"/> | |
</map> |
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
ValueTypeBuilder Map<TReturn>(Expression<Func<T, TReturn>> property) | |
where TReturn : ValueType | |
{ | |
return new ValueTypeBuilder(property); | |
} | |
EntityBuilder Map<TReturn>(Expression<Func<T, TReturn>> property) | |
where TReturn : class | |
{ | |
return new EntityBuilder(property); |
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
interface ILine | |
{} | |
class AdditionLine : ILine {} | |
class SubtractionLine : ILine {} | |
class ModificationLine : ILine {} | |
void ProcessLines(IList<ILine> lines) {} | |
var additions = new List<AdditionLine>(); |
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 Form1 : Form | |
{ | |
public Form1() | |
{ | |
Width = 700; | |
} | |
} |
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
# my git clone workflow (on windows) | |
git clone _whatever_ | |
git status | |
# if you get anything showing up as changed in your status output, you've got | |
# line endings issues. if status is clean, you're good to go, otherwise: | |
git config core.autocrlf false | |
git status |