Created
October 12, 2012 14:31
-
-
Save markrendle/3879479 to your computer and use it in GitHub Desktop.
Interfaces for Simple.Data + Impromptu
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 interface IDatabase | |
{ | |
ICustomers Customers { get; } | |
IEmployees Employees { get; } | |
} | |
public interface ICustomers | |
{ | |
ICustomer Get(int id); | |
[UseNamedArgument] | |
ICustomer Insert(string name = null, string location = null); | |
} | |
public interface IEmployees | |
{ | |
[UseNamedArgument] | |
IEmployee Insert(string name = null, int employerId = 0); | |
} | |
public interface ICustomer | |
{ | |
int Id { get; set; } | |
string Name { get; set; } | |
string Location { get; set; } | |
IList<IEmployee> Employees { get; } | |
} | |
public interface IEmployee | |
{ | |
int Id { get; set; } | |
int EmployerId { get; set; } | |
ICustomer Employer { get; } | |
string Name { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment