예제 #1
0
        public static CrudResult <T> Success(T result)
        {
            CrudResult <T> crudeResult = new CrudResult <T>(result);

            crudeResult.IsSuccessful = true;
            return(crudeResult);
        }
예제 #2
0
        public static CrudResult <T> Failure(string error)
        {
            CrudResult <T> crudeResult = new CrudResult <T>(default(T));

            crudeResult.IsSuccessful = false;
            crudeResult.ErrorMessage = error;
            return(crudeResult);
        }