Created
July 28, 2011 13:58
-
-
Save ashic/1111599 to your computer and use it in GitHub Desktop.
testing duck
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
namespace DuckTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var connectionString = ConfigurationManager.ConnectionStrings["DB"].ConnectionString; | |
var db = new DuckContext(connectionString); | |
db.In<Person>() | |
.Where(x => x.Age == 5) | |
.Update(x => new Person {Name = "Foo"}); | |
} | |
} | |
[Duck.Table(Name="People")] | |
public class Person | |
{ | |
public Guid PersonId { get; set; } | |
public string Name { get; set; } | |
public int Age { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment