mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 01:05:27 +08:00 
			
		
		
		
	ZeroDb 增加自定义异常,方便在外部捕获
This commit is contained in:
		@@ -0,0 +1,9 @@
 | 
			
		||||
using System;
 | 
			
		||||
 | 
			
		||||
namespace FreeSql.Extensions.ZeroEntity.Models
 | 
			
		||||
{
 | 
			
		||||
    public class SchemaValidationException : Exception
 | 
			
		||||
    {
 | 
			
		||||
        public SchemaValidationException(string message) : base(message) { }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,21 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Text;
 | 
			
		||||
 | 
			
		||||
namespace FreeSql.Extensions.ZeroEntity.Models
 | 
			
		||||
{
 | 
			
		||||
    public class SchemaValidationResult
 | 
			
		||||
    {
 | 
			
		||||
        public readonly static SchemaValidationResult _schemaValidationResult = new SchemaValidationResult();
 | 
			
		||||
 | 
			
		||||
        public static SchemaValidationResult SuccessedResult => _schemaValidationResult;
 | 
			
		||||
 | 
			
		||||
        public SchemaValidationResult(string errorMessage)
 | 
			
		||||
        {
 | 
			
		||||
            ErrorMessage = errorMessage;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public string ErrorMessage { get; set; }
 | 
			
		||||
        public bool Succeeded { get; set; } = false;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user