- a module for IT services business

- Mvc-like action binding in the WF web api ... ?

* Yavsc.sln:
* Web.csproj:
* MvcActionValueBinder.cs:
* yavscModel.csproj:
* WFOrder.cs:
* IWFOrder.cs:
* BasketImpact.cs:
* ProjectInfo.cs:
* IWFModule.cs:
* IWFCommand.cs:
* WorkFlowController.cs:
* NewProjectModel.cs:
* IContentProvider.cs:
* ITCPNpgsqlProvider.cs:
* WorkFlowProvider.csproj:
* ITContentProvider.csproj:
* AssemblyInfo.cs:
* OrderStatusChangedEventArgs.cs: 

* NpgsqlContentProvider.cs:
This commit is contained in:
Paul Schneider 2014-07-24 05:04:56 +02:00
commit fa93ce7fee
19 changed files with 412 additions and 122 deletions

View file

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using WorkFlowProvider;
using yavscModel.WorkFlow;
using System.Web.Http.Controllers;
using System.Web.Http.ModelBinding;
namespace Yavsc.ApiControllers
{
public class BasketImpact
{
public string ProductRef { get; set; }
public int count { get; set; }
}
}

View file

@ -6,9 +6,11 @@ using System.Web;
using System.Web.Http;
using WorkFlowProvider;
using yavscModel.WorkFlow;
using System.Web.Http.Controllers;
namespace Yavsc.ApiControllers
{
[HttpControllerConfiguration(ActionValueBinder=typeof(Basic.MvcActionValueBinder))]
public class WorkFlowController : ApiController
{
[HttpGet]
@ -17,7 +19,13 @@ namespace Yavsc.ApiControllers
return new { test="Hello World" };
}
[HttpGet]
public object Order (BasketImpact bi)
{
return new { c="lmk,", message="Panier impacté", impactRef=bi.ProductRef, count=bi.count};
}
/*
public object Details(int id)
{
throw new NotImplementedException ();
@ -27,6 +35,7 @@ namespace Yavsc.ApiControllers
{
throw new NotImplementedException ();
}
public object Edit(int id)
{
throw new NotImplementedException ();
@ -46,6 +55,6 @@ namespace Yavsc.ApiControllers
}
}
*/
}
}