Files
Examples/GerstITS.WebClients.Example.Api/Contracts/ICustomer.cs
T

36 lines
985 B
C#

using GerstITS.Web.WebClients;
namespace GerstITS.Examples.WebClients.Examples.Api;
public interface ICustomer : IWebService
{
[WebMethod(WebMethods.Get),
ResourceUrl("Customer/{id}"),
HttpHeader(Name = "X-Client", Value = "GerstITS.Examples.WebClient")]
Customer Get(int id);
[WebMethod(WebMethods.Post),
ResourceUrl("Customer/Search")]
SearchResult<Customer> Search(CustomerSearchCriteria criteria);
[WebMethod(WebMethods.Post),
ResourceUrl("Customer")]
Customer Create(Customer model);
[WebMethod(WebMethods.Put),
ResourceUrl("Customer")]
Customer Update(Customer model);
[WebMethod(WebMethods.Delete),
ResourceUrl("Customer/{id}")]
bool Delete(int id);
[WebMethod(WebMethods.Get),
ResourceUrl("Customer/{id}/Notes")]
IEnumerable<CustomerNote> GetNotes(int id);
[WebMethod(WebMethods.Post),
ResourceUrl("Customer/{id}/Notes")]
CustomerNote AddNote(int id, CustomerNote note);
}