public async Task <TResponse> TrySaveChangesAsync <TResponse>()
     where TResponse : CrudResponse <TResponse>, new()
 {
     return((await TrySaveChangesAsync())
         ? CrudResponse <TResponse> .Success()
         : CrudResponse <TResponse> .Error(ErrorType.DatabaseError));
 }
 public async Task <TResponse> TrySaveChangesAsync <TResponse>()
     where TResponse : CrudResponse <TResponse>, new()
 {
     return((await TrySaveChangesAsync())
         ? CrudResponse <TResponse> .Success()
         : new TResponse());
 }
        public async Task <TResponse> TrySaveChangesAsync <TResponse>(Action <TResponse> responseModifierOnSuccess)
            where TResponse : CrudResponse <TResponse>, new()
        {
            if (await TrySaveChangesAsync())
            {
                var response = CrudResponse <TResponse> .Success();

                responseModifierOnSuccess(response);
                return(response);
            }
            return(new TResponse());
        }
 public TResponse Success() => CrudResponse <TResponse> .Success();