Esempio n. 1
0
 public static ContractResponse <TResponse> CreateResponse <TResponse, TRequest>(ContractRequest <TRequest> request, TResponse data)
     where TRequest : class
     where TResponse : class
 {
     if (request == null)
     {
         request = new ContractRequest <TRequest>();
     }
     return(CreateResponse(request, new List <TResponse> {
         data
     }, 0, 0));
 }
Esempio n. 2
0
 public static ContractResponse <TResponse> CreateResponse <TResponse, TRequest>(ContractRequest <TRequest> request, IEnumerable <TResponse> data, long count, long countFilter)
     where TRequest : class
     where TResponse : class
 {
     return(new ContractResponse <TResponse>
     {
         Data = data.ToList(),
         ErrorMessages = new string[] { },
         DataCount = data.Count(),
         IsValid = true,
     });
 }
Esempio n. 3
0
 public static ContractResponse <TResponse> CreateResponse <TResponse, TRequest>(ContractRequest <TRequest> request, IEnumerable <TResponse> data)
     where TRequest : class
     where TResponse : class
 {
     if (request == null)
     {
         request = new ContractRequest <TRequest>();
     }
     return(CreateResponse(request, data, 0, 0));
 }