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

            return(toReturn);
        }
Ejemplo 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,
     });
 }