Update to latest packages and show examples

This commit is contained in:
2026-07-05 22:05:53 +02:00
parent 3a36978997
commit c7ddc282ed
52 changed files with 2156 additions and 21 deletions
@@ -0,0 +1,35 @@
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);
}
@@ -0,0 +1,15 @@
namespace GerstITS.Examples.WebClients.Examples.Api;
public class Customer
{
#region Properties
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string EMail { get; set; }
public string DisplayName { get; set; }
public bool IsActive { get; set; }
#endregion
}
@@ -0,0 +1,12 @@
namespace GerstITS.Examples.WebClients.Examples.Api;
public class CustomerNote
{
#region Properties
public int Id { get; set; }
public string Text { get; set; }
public DateTime ValidFrom { get; set; }
#endregion
}
@@ -0,0 +1,17 @@
namespace GerstITS.Examples.WebClients.Examples.Api;
public class CustomerSearchCriteria
{
#region Properties
public string Name { get; set; }
public string EMail { get; set; }
public int? Skip { get; set; }
public int? Take { get; set; }
public string SortBy { get; set; }
public SortingDirections SortDirection { get; set; }
#endregion
}