mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 01:05:27 +08:00 
			
		
		
		
	ZeroDb 增加自定义异常,方便在外部捕获
This commit is contained in:
		@@ -23,7 +23,7 @@
 | 
			
		||||
	</PropertyGroup>
 | 
			
		||||
 | 
			
		||||
	<ItemGroup>
 | 
			
		||||
		<None Include="../../readme.md" Pack="true" PackagePath="\"/>
 | 
			
		||||
		<None Include="../../readme.md" Pack="true" PackagePath="\" />
 | 
			
		||||
		<None Include="../../logo.png" Pack="true" PackagePath="\" />
 | 
			
		||||
	</ItemGroup>
 | 
			
		||||
 | 
			
		||||
@@ -39,5 +39,5 @@
 | 
			
		||||
	<ItemGroup>
 | 
			
		||||
		<ProjectReference Include="..\..\FreeSql\FreeSql.csproj" />
 | 
			
		||||
	</ItemGroup>
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
</Project>
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user