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, data, 0, 0));
 }
Esempio n. 2
0
        public static ContractRequest <TRequest> CreateRequest <TRequest>(TRequest dtoData)
            where TRequest : class
        {
            var toReturn = new ContractRequest <TRequest>
            {
                Data = dtoData,
            };

            return(toReturn);
        }
Esempio n. 3
0
 public static ContractResponse <TResponse> CreateResponse <TResponse, TRequest>(ContractRequest <TRequest> request, TResponse data, long count, long countFilter)
     where TRequest : class
     where TResponse : class
 {
     return(new ContractResponse <TResponse>
     {
         Data = data,
         ErrorMessages = new List <string> {
             ""
         },
         IsValid = true,
     });
 }