public static DomainResult Failure(HttpStatusCode code, string error)
        {
            var failure = new DomainResult(false);

            if (!string.IsNullOrWhiteSpace(error))
            {
                failure._errorMessage = new KeyValuePair <HttpStatusCode, string>(code, error);
            }

            return(failure);
        }
 public static BaseResponse Failure(HttpStatusCode code, string error) =>
 new BaseResponse()
 {
     Result = DomainResult.Failure(code, error)
 };
 public static T Failure <T>(HttpStatusCode code, string error) where T : BaseResponse, new() =>
 new T
 {
     Result = DomainResult.Failure(code, error)
 };