Skip to content

Instantly share code, notes, and snippets.

{
"data": {
"mobile_numbers": [
{ "number": "+44 (0)07779288893" },
{ "number": "+44 (0)07779288893" }
],
"email_addresses": [
{"address":"me@there.com"},
{"address":"you@there.com"}
@Fodsuk
Fodsuk / gist:3025099
Created June 30, 2012 18:56
service layer exampe
public class InventoryController : ApiController
{
private readonly IInventoryManagementService _inventoryManagementService;
private readonly IUnitOfWork _unitOfWork;
public InventoryController(IUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork; //access services
_inventoryManagementService = _unitOfWork.Get<IInventoryManagementService>();
}
public class MyModel {
public string Prop1 { get; set; }
public string Prop2 { get; set; }
[DataType.Date]
public string Prop3 { get; set; }