#694 Exception信息 国际化 多语言

This commit is contained in:
igeekfan
2022-05-20 02:52:58 +08:00
parent a7b40e9a5a
commit 83a4bb8039
79 changed files with 5343 additions and 398 deletions

View File

@ -0,0 +1,357 @@

// <auto-generated />
using System;
using System.Reflection;
using System.Resources;
using System.Threading;
namespace FreeSql
{
/// <summary>
/// <para>
/// String resources used in FreeSql exceptions, etc.
/// </para>
/// <para>
/// These strings are exposed publicly for use by database providers and extensions.
/// It is unusual for application code to need these strings.
/// </para>
/// </summary>
public static class DbContextStrings
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("FreeSql.DbContext.Properties.DbContextStrings", typeof(DbContextStrings).Assembly);
/// <summary>
/// AddFreeDbContext 发生错误,请检查 {dbContextTypeName} 的构造参数都已正确注入
/// </summary>
public static string AddFreeDbContextError_CheckConstruction(object dbContextTypeName)
=> string.Format(
GetString("AddFreeDbContextError_CheckConstruction", nameof(dbContextTypeName)),
dbContextTypeName);
/// <summary>
/// 不可添加,已存在于状态管理:{entityString}
/// </summary>
public static string CannotAdd_AlreadyExistsInStateManagement(object entityString)
=> string.Format(
GetString("CannotAdd_AlreadyExistsInStateManagement", nameof(entityString)),
entityString);
/// <summary>
/// 不可添加,实体没有主键:{entityString}
/// </summary>
public static string CannotAdd_EntityHasNo_PrimaryKey(object entityString)
=> string.Format(
GetString("CannotAdd_EntityHasNo_PrimaryKey", nameof(entityString)),
entityString);
/// <summary>
/// 不可添加,未设置主键的值:{entityString}
/// </summary>
public static string CannotAdd_PrimaryKey_NotSet(object entityString)
=> string.Format(
GetString("CannotAdd_PrimaryKey_NotSet", nameof(entityString)),
entityString);
/// <summary>
/// 不可添加,自增属性有值:{entityString}
/// </summary>
public static string CannotAdd_SelfIncreasingHasValue(object entityString)
=> string.Format(
GetString("CannotAdd_SelfIncreasingHasValue", nameof(entityString)),
entityString);
/// <summary>
/// 不可附加,实体没有主键:{entityString}
/// </summary>
public static string CannotAttach_EntityHasNo_PrimaryKey(object entityString)
=> string.Format(
GetString("CannotAttach_EntityHasNo_PrimaryKey", nameof(entityString)),
entityString);
/// <summary>
/// 不可附加,未设置主键的值:{entityString}
/// </summary>
public static string CannotAttach_PrimaryKey_NotSet(object entityString)
=> string.Format(
GetString("CannotAttach_PrimaryKey_NotSet", nameof(entityString)),
entityString);
/// <summary>
/// 不可删除,数据未被跟踪,应该先查询:{entityString}
/// </summary>
public static string CannotDelete_DataNotTracked_ShouldQuery(object entityString)
=> string.Format(
GetString("CannotDelete_DataNotTracked_ShouldQuery", nameof(entityString)),
entityString);
/// <summary>
/// 不可删除,实体没有主键:{entityString}
/// </summary>
public static string CannotDelete_EntityHasNo_PrimaryKey(object entityString)
=> string.Format(
GetString("CannotDelete_EntityHasNo_PrimaryKey", nameof(entityString)),
entityString);
/// <summary>
/// 不可删除,未设置主键的值:{entityString}
/// </summary>
public static string CannotDelete_PrimaryKey_NotSet(object entityString)
=> string.Format(
GetString("CannotDelete_PrimaryKey_NotSet", nameof(entityString)),
entityString);
/// <summary>
/// 不可进行编辑,实体没有主键:{entityString}
/// </summary>
public static string CannotEdit_EntityHasNo_PrimaryKey(object entityString)
=> string.Format(
GetString("CannotEdit_EntityHasNo_PrimaryKey", nameof(entityString)),
entityString);
/// <summary>
/// 不可更新,数据未被跟踪,应该先查询 或者 Attach{entityString}
/// </summary>
public static string CannotUpdate_DataShouldQueryOrAttach(object entityString)
=> string.Format(
GetString("CannotUpdate_DataShouldQueryOrAttach", nameof(entityString)),
entityString);
/// <summary>
/// 不可更新,实体没有主键:{entityString}
/// </summary>
public static string CannotUpdate_EntityHasNo_PrimaryKey(object entityString)
=> string.Format(
GetString("CannotUpdate_EntityHasNo_PrimaryKey", nameof(entityString)),
entityString);
/// <summary>
/// 不可更新,未设置主键的值:{entityString}
/// </summary>
public static string CannotUpdate_PrimaryKey_NotSet(object entityString)
=> string.Format(
GetString("CannotUpdate_PrimaryKey_NotSet", nameof(entityString)),
entityString);
/// <summary>
/// 不可更新,数据库不存在该记录:{entityString}
/// </summary>
public static string CannotUpdate_RecordDoesNotExist(object entityString)
=> string.Format(
GetString("CannotUpdate_RecordDoesNotExist", nameof(entityString)),
entityString);
/// <summary>
/// 请在 OnConfiguring 或 AddFreeDbContext 中配置 UseFreeSql
/// </summary>
public static string ConfigureUseFreeSql
=> GetString("ConfigureUseFreeSql");
/// <summary>
/// DbSet.AsType 参数错误,请传入正确的实体类型
/// </summary>
public static string DbSetAsType_NotSupport_Object
=> GetString("DbSetAsType_NotSupport_Object");
/// <summary>
/// 实体类型 {EntityTypeName} 无法转换为 {name},无法使用该方法
/// </summary>
public static string EntityType_CannotConvert(object EntityTypeName, object name)
=> string.Format(
GetString("EntityType_CannotConvert", nameof(EntityTypeName), nameof(name)),
EntityTypeName, name);
/// <summary>
/// 实体类型 {EntityTypeName} 主键类型不为 {fullName},无法使用该方法
/// </summary>
public static string EntityType_PrimaryKeyError(object EntityTypeName, object fullName)
=> string.Format(
GetString("EntityType_PrimaryKeyError", nameof(EntityTypeName), nameof(fullName)),
EntityTypeName, fullName);
/// <summary>
/// 实体类型 {EntityTypeName} 主键数量不为 1无法使用该方法
/// </summary>
public static string EntityType_PrimaryKeyIsNotOne(object EntityTypeName)
=> string.Format(
GetString("EntityType_PrimaryKeyIsNotOne", nameof(EntityTypeName)),
EntityTypeName);
/// <summary>
/// FreeSql.Repository 设置过滤器失败,原因是对象不属于 IRepository
/// </summary>
public static string FailedSetFilter_NotBelongIRpository
=> GetString("FailedSetFilter_NotBelongIRpository");
/// <summary>
/// 不可比较,实体没有主键:{entityString}
/// </summary>
public static string Incomparable_EntityHasNo_PrimaryKey(object entityString)
=> string.Format(
GetString("Incomparable_EntityHasNo_PrimaryKey", nameof(entityString)),
entityString);
/// <summary>
/// 不可比较,未设置主键的值:{entityString}
/// </summary>
public static string Incomparable_PrimaryKey_NotSet(object entityString)
=> string.Format(
GetString("Incomparable_PrimaryKey_NotSet", nameof(entityString)),
entityString);
/// <summary>
/// FreeSql.Repository Insert 失败,因为设置了过滤器 {filterKey}: {filterValueExpression},插入的数据不符合 {entityString}
/// </summary>
public static string InsertError_Filter(object filterKey, object filterValueExpression, object entityString)
=> string.Format(
GetString("InsertError_Filter", nameof(filterKey), nameof(filterValueExpression), nameof(entityString)),
filterKey, filterValueExpression, entityString);
/// <summary>
/// ISelect.AsType 参数不支持指定为 object
/// </summary>
public static string ISelectAsType_ParameterError
=> GetString("ISelectAsType_ParameterError");
/// <summary>
/// {tableTypeFullName} 不存在属性 {propertyName}
/// </summary>
public static string NotFound_Property(object tableTypeFullName, object propertyName)
=> string.Format(
GetString("NotFound_Property", nameof(tableTypeFullName), nameof(propertyName)),
tableTypeFullName, propertyName);
/// <summary>
/// 找不到方法 DbSet&lt;&gt;.StatesRemoveByObjects
/// </summary>
public static string NotFoundMethod_StatesRemoveByObjects
=> GetString("NotFoundMethod_StatesRemoveByObjects");
/// <summary>
/// 参数 data 类型错误 {entityTypeFullName}
/// </summary>
public static string ParameterDataTypeError(object entityTypeFullName)
=> string.Format(
GetString("ParameterDataTypeError", nameof(entityTypeFullName)),
entityTypeFullName);
/// <summary>
/// 参数错误 {param}
/// </summary>
public static string ParameterError(object param)
=> string.Format(
GetString("ParameterError", nameof(param)),
param);
/// <summary>
/// 参数错误 {param} 不能为 null
/// </summary>
public static string ParameterError_CannotBeNull(object param)
=> string.Format(
GetString("ParameterError_CannotBeNull", nameof(param)),
param);
/// <summary>
/// 参数错误 {many} 不是集合属性
/// </summary>
public static string ParameterError_IsNot_CollectionProperties(object many)
=> string.Format(
GetString("ParameterError_IsNot_CollectionProperties", nameof(many)),
many);
/// <summary>
/// 参数错误 {many} 集合属性不存在
/// </summary>
public static string ParameterError_NotFound_CollectionProperties(object many)
=> string.Format(
GetString("ParameterError_NotFound_CollectionProperties", nameof(many)),
many);
/// <summary>
/// 参数错误 {one} 属性不存在
/// </summary>
public static string ParameterError_NotFound_Property(object one)
=> string.Format(
GetString("ParameterError_NotFound_Property", nameof(one)),
one);
/// <summary>
/// Propagation_Mandatory: 使用当前事务,如果没有当前事务,就抛出异常
/// </summary>
public static string Propagation_Mandatory
=> GetString("Propagation_Mandatory");
/// <summary>
/// Propagation_Never: 以非事务方式执行操作,如果当前事务存在则抛出异常
/// </summary>
public static string Propagation_Never
=> GetString("Propagation_Never");
/// <summary>
/// {tableTypeFullName} 类型的属性 {propertyName} 不是 OneToMany 或 ManyToMany 特性
/// </summary>
public static string PropertyOfType_IsNot_OneToManyOrManyToMany(object tableTypeFullName, object propertyName)
=> string.Format(
GetString("PropertyOfType_IsNot_OneToManyOrManyToMany", nameof(tableTypeFullName), nameof(propertyName)),
tableTypeFullName, propertyName);
/// <summary>
/// 特别错误:批量添加失败,{dataType} 的返回数据,与添加的数目不匹配
/// </summary>
public static string SpecialError_BatchAdditionFailed(object dataType)
=> string.Format(
GetString("SpecialError_BatchAdditionFailed", nameof(dataType)),
dataType);
/// <summary>
/// 特别错误:更新失败,数据未被跟踪:{entityString}
/// </summary>
public static string SpecialError_UpdateFailedDataNotTracked(object entityString)
=> string.Format(
GetString("SpecialError_UpdateFailedDataNotTracked", nameof(entityString)),
entityString);
/// <summary>
/// 已开启事务,不能禁用工作单元
/// </summary>
public static string TransactionHasBeenStarted
=> GetString("TransactionHasBeenStarted");
/// <summary>
/// {tableTypeFullName} 类型已设置属性 {propertyName} 忽略特性
/// </summary>
public static string TypeHasSetProperty_IgnoreAttribute(object tableTypeFullName, object propertyName)
=> string.Format(
GetString("TypeHasSetProperty_IgnoreAttribute", nameof(tableTypeFullName), nameof(propertyName)),
tableTypeFullName, propertyName);
/// <summary>
/// {unitOfWorkManager} 构造参数 {fsql} 不能为 null
/// </summary>
public static string UnitOfWorkManager_Construction_CannotBeNull(object unitOfWorkManager, object fsql)
=> string.Format(
GetString("UnitOfWorkManager_Construction_CannotBeNull", nameof(unitOfWorkManager), nameof(fsql)),
unitOfWorkManager, fsql);
/// <summary>
/// FreeSql.Repository Update 失败,因为设置了过滤器 {filterKey}: {filterValueExpression},更新的数据不符合{entityString}
/// </summary>
public static string UpdateError_Filter(object filterKey, object filterValueExpression, object entityString)
=> string.Format(
GetString("UpdateError_Filter", nameof(filterKey), nameof(filterValueExpression), nameof(entityString)),
filterKey, filterValueExpression, entityString);
private static string GetString(string name, params string[] formatterNames)
{
var value = _resourceManager.GetString(name);
for (var i = 0; i < formatterNames.Length; i++)
{
value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
}
return value;
}
}
}

View File

@ -0,0 +1,5 @@
<#
Session["ResourceFile"] = "DbContextStrings.resx";
Session["AccessModifier"] = "public";
#>
<#@ include file="../../FreeSql/Properties/Resources.tt" #>

View File

@ -0,0 +1,246 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AddFreeDbContextError_CheckConstruction" xml:space="preserve">
<value>An error occurred in AddFreeDbContext, check that the construction parameters of {dbContextTypeName} have been injected correctly</value>
</data>
<data name="CannotAdd_AlreadyExistsInStateManagement" xml:space="preserve">
<value>Not addable, already exists in state management: {entityString}</value>
</data>
<data name="CannotAdd_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>Not addable, entity has no primary key: {entityString}</value>
</data>
<data name="CannotAdd_PrimaryKey_NotSet" xml:space="preserve">
<value>Not addable, no value for primary key set: {entityString}</value>
</data>
<data name="CannotAdd_SelfIncreasingHasValue" xml:space="preserve">
<value>Not addable, self-increasing attribute has value: {entityString}</value>
</data>
<data name="CannotAttach_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>Not attachable, entity has no primary key: {entityString}</value>
</data>
<data name="CannotAttach_PrimaryKey_NotSet" xml:space="preserve">
<value>Not attachable, no value for primary key set: {entityString}</value>
</data>
<data name="CannotDelete_DataNotTracked_ShouldQuery" xml:space="preserve">
<value>Not deletable, data not tracked, should query first: {entityString}</value>
</data>
<data name="CannotDelete_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>Not deletable, entity has no primary key: {entityString}</value>
</data>
<data name="CannotDelete_PrimaryKey_NotSet" xml:space="preserve">
<value>Not deletable, no value for primary key set: {entityString}</value>
</data>
<data name="CannotEdit_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>Not editable, entity has no primary key: {entityString}</value>
</data>
<data name="CannotUpdate_DataShouldQueryOrAttach" xml:space="preserve">
<value>Not updatable, data not tracked, should be queried first or Attach:{entityString}</value>
</data>
<data name="CannotUpdate_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>Not updatable, entity has no primary key: {entityString}</value>
</data>
<data name="CannotUpdate_PrimaryKey_NotSet" xml:space="preserve">
<value>Not updatable, no value for primary key set: {entityString}</value>
</data>
<data name="CannotUpdate_RecordDoesNotExist" xml:space="preserve">
<value>Not updatable, the record does not exist in the database: {entityString}</value>
</data>
<data name="ConfigureUseFreeSql" xml:space="preserve">
<value>Please configure UseFreeSql in OnConfiguring or AddFreeDbContext</value>
</data>
<data name="DbSetAsType_NotSupport_Object" xml:space="preserve">
<value>DbSet. AsType parameter error, please pass in the correct entity type</value>
</data>
<data name="EntityType_CannotConvert" xml:space="preserve">
<value>Entity type {EntityTypeName} cannot be converted to {name} and cannot use this method</value>
</data>
<data name="EntityType_PrimaryKeyError" xml:space="preserve">
<value>Entity type {EntityTypeName} Primary key type is not {fullName} and cannot be used with this method</value>
</data>
<data name="EntityType_PrimaryKeyIsNotOne" xml:space="preserve">
<value>Entity type {EntityTypeName} Primary key number is not 1 and cannot be used with this method</value>
</data>
<data name="FailedSetFilter_NotBelongIRpository" xml:space="preserve">
<value>FreeSql. Repository failed to set filter because object does not belong to IRepository</value>
</data>
<data name="Incomparable_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>Not comparable, entity has no primary key: {entityString}</value>
</data>
<data name="Incomparable_PrimaryKey_NotSet" xml:space="preserve">
<value>Non-comparable, no value for primary key set: {entityString}</value>
</data>
<data name="InsertError_Filter" xml:space="preserve">
<value>FreeSql. Repository Insert failed because the filter {filterKey}: {filterValueExpression} was set and the inserted data does not conform to {entityString}</value>
</data>
<data name="ISelectAsType_ParameterError" xml:space="preserve">
<value>ISelect. AsType parameter does not support specifying as object</value>
</data>
<data name="NotFound_Property" xml:space="preserve">
<value>Property {propertyName} does not exist for {tableTypeFullName}</value>
</data>
<data name="NotFoundMethod_StatesRemoveByObjects" xml:space="preserve">
<value>Method DbSet&lt;&gt; not found. StatesRemoveByObjects</value>
</data>
<data name="ParameterDataTypeError" xml:space="preserve">
<value>Parameter data type error {entityTypeFullName}</value>
</data>
<data name="ParameterError" xml:space="preserve">
<value>Parameter error {param}</value>
</data>
<data name="ParameterError_CannotBeNull" xml:space="preserve">
<value>Parameter error {param} cannot be null</value>
</data>
<data name="ParameterError_IsNot_CollectionProperties" xml:space="preserve">
<value>Parameter error {many} is not a collection property</value>
</data>
<data name="ParameterError_NotFound_CollectionProperties" xml:space="preserve">
<value>Parameter error {many} Collection property does not exist</value>
</data>
<data name="ParameterError_NotFound_Property" xml:space="preserve">
<value>Parameter error {one} attribute does not exist</value>
</data>
<data name="Propagation_Mandatory" xml:space="preserve">
<value>Propagation_ Mandatory: With the current transaction, throw an exception if there is no current transaction</value>
</data>
<data name="Propagation_Never" xml:space="preserve">
<value>Propagation_ Never: Perform the operation non-transactionally and throw an exception if the current transaction exists</value>
</data>
<data name="PropertyOfType_IsNot_OneToManyOrManyToMany" xml:space="preserve">
<value>Property {propertyName} of type {tableTypeFullName} is not OneToMany or ManyToMany attribute</value>
</data>
<data name="SpecialError_BatchAdditionFailed" xml:space="preserve">
<value>Special error: Bulk add failed, {dataType} returned data, does not match the number added</value>
</data>
<data name="SpecialError_UpdateFailedDataNotTracked" xml:space="preserve">
<value>Special error: Update failed, data not tracked: {entityString}</value>
</data>
<data name="TransactionHasBeenStarted" xml:space="preserve">
<value>Transaction opened, unit of work cannot be disabled</value>
</data>
<data name="TypeHasSetProperty_IgnoreAttribute" xml:space="preserve">
<value>The {tableTypeFullName} type has set the property {propertyName} Ignore the attribute</value>
</data>
<data name="UnitOfWorkManager_Construction_CannotBeNull" xml:space="preserve">
<value>The {unitOfWorkManager} constructor parameter {fsql} cannot be null</value>
</data>
<data name="UpdateError_Filter" xml:space="preserve">
<value>FreeSql. Repository Update failed because the filter {filterKey}: {filterValueExpression} is set and the updated data does not conform to {entityString}</value>
</data>
</root>

View File

@ -0,0 +1,246 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AddFreeDbContextError_CheckConstruction" xml:space="preserve">
<value>AddFreeDbContext 发生错误,请检查 {dbContextTypeName} 的构造参数都已正确注入</value>
</data>
<data name="CannotAdd_AlreadyExistsInStateManagement" xml:space="preserve">
<value>不可添加,已存在于状态管理:{entityString}</value>
</data>
<data name="CannotAdd_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>不可添加,实体没有主键:{entityString}</value>
</data>
<data name="CannotAdd_PrimaryKey_NotSet" xml:space="preserve">
<value>不可添加,未设置主键的值:{entityString}</value>
</data>
<data name="CannotAdd_SelfIncreasingHasValue" xml:space="preserve">
<value>不可添加,自增属性有值:{entityString}</value>
</data>
<data name="CannotAttach_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>不可附加,实体没有主键:{entityString}</value>
</data>
<data name="CannotAttach_PrimaryKey_NotSet" xml:space="preserve">
<value>不可附加,未设置主键的值:{entityString}</value>
</data>
<data name="CannotDelete_DataNotTracked_ShouldQuery" xml:space="preserve">
<value>不可删除,数据未被跟踪,应该先查询:{entityString}</value>
</data>
<data name="CannotDelete_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>不可删除,实体没有主键:{entityString}</value>
</data>
<data name="CannotDelete_PrimaryKey_NotSet" xml:space="preserve">
<value>不可删除,未设置主键的值:{entityString}</value>
</data>
<data name="CannotEdit_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>不可进行编辑,实体没有主键:{entityString}</value>
</data>
<data name="CannotUpdate_DataShouldQueryOrAttach" xml:space="preserve">
<value>不可更新,数据未被跟踪,应该先查询 或者 Attach{entityString}</value>
</data>
<data name="CannotUpdate_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>不可更新,实体没有主键:{entityString}</value>
</data>
<data name="CannotUpdate_PrimaryKey_NotSet" xml:space="preserve">
<value>不可更新,未设置主键的值:{entityString}</value>
</data>
<data name="CannotUpdate_RecordDoesNotExist" xml:space="preserve">
<value>不可更新,数据库不存在该记录:{entityString}</value>
</data>
<data name="ConfigureUseFreeSql" xml:space="preserve">
<value>请在 OnConfiguring 或 AddFreeDbContext 中配置 UseFreeSql</value>
</data>
<data name="DbSetAsType_NotSupport_Object" xml:space="preserve">
<value>DbSet.AsType 参数错误,请传入正确的实体类型</value>
</data>
<data name="EntityType_CannotConvert" xml:space="preserve">
<value>实体类型 {EntityTypeName} 无法转换为 {name},无法使用该方法</value>
</data>
<data name="EntityType_PrimaryKeyError" xml:space="preserve">
<value>实体类型 {EntityTypeName} 主键类型不为 {fullName},无法使用该方法</value>
</data>
<data name="EntityType_PrimaryKeyIsNotOne" xml:space="preserve">
<value>实体类型 {EntityTypeName} 主键数量不为 1无法使用该方法</value>
</data>
<data name="FailedSetFilter_NotBelongIRpository" xml:space="preserve">
<value>FreeSql.Repository 设置过滤器失败,原因是对象不属于 IRepository</value>
</data>
<data name="Incomparable_EntityHasNo_PrimaryKey" xml:space="preserve">
<value>不可比较,实体没有主键:{entityString}</value>
</data>
<data name="Incomparable_PrimaryKey_NotSet" xml:space="preserve">
<value>不可比较,未设置主键的值:{entityString}</value>
</data>
<data name="InsertError_Filter" xml:space="preserve">
<value>FreeSql.Repository Insert 失败,因为设置了过滤器 {filterKey}: {filterValueExpression},插入的数据不符合 {entityString}</value>
</data>
<data name="ISelectAsType_ParameterError" xml:space="preserve">
<value>ISelect.AsType 参数不支持指定为 object</value>
</data>
<data name="NotFound_Property" xml:space="preserve">
<value>{tableTypeFullName} 不存在属性 {propertyName}</value>
</data>
<data name="NotFoundMethod_StatesRemoveByObjects" xml:space="preserve">
<value>找不到方法 DbSet&lt;&gt;.StatesRemoveByObjects</value>
</data>
<data name="ParameterDataTypeError" xml:space="preserve">
<value>参数 data 类型错误 {entityTypeFullName} </value>
</data>
<data name="ParameterError" xml:space="preserve">
<value>参数错误 {param}</value>
</data>
<data name="ParameterError_CannotBeNull" xml:space="preserve">
<value>参数错误 {param} 不能为 null</value>
</data>
<data name="ParameterError_IsNot_CollectionProperties" xml:space="preserve">
<value>参数错误 {many} 不是集合属性</value>
</data>
<data name="ParameterError_NotFound_CollectionProperties" xml:space="preserve">
<value>参数错误 {many} 集合属性不存在</value>
</data>
<data name="ParameterError_NotFound_Property" xml:space="preserve">
<value>参数错误 {one} 属性不存在</value>
</data>
<data name="Propagation_Mandatory" xml:space="preserve">
<value>Propagation_Mandatory: 使用当前事务,如果没有当前事务,就抛出异常</value>
</data>
<data name="Propagation_Never" xml:space="preserve">
<value>Propagation_Never: 以非事务方式执行操作,如果当前事务存在则抛出异常</value>
</data>
<data name="PropertyOfType_IsNot_OneToManyOrManyToMany" xml:space="preserve">
<value>{tableTypeFullName} 类型的属性 {propertyName} 不是 OneToMany 或 ManyToMany 特性</value>
</data>
<data name="SpecialError_BatchAdditionFailed" xml:space="preserve">
<value>特别错误:批量添加失败,{dataType} 的返回数据,与添加的数目不匹配</value>
</data>
<data name="SpecialError_UpdateFailedDataNotTracked" xml:space="preserve">
<value>特别错误:更新失败,数据未被跟踪:{entityString}</value>
</data>
<data name="TransactionHasBeenStarted" xml:space="preserve">
<value>已开启事务,不能禁用工作单元</value>
</data>
<data name="TypeHasSetProperty_IgnoreAttribute" xml:space="preserve">
<value>{tableTypeFullName} 类型已设置属性 {propertyName} 忽略特性</value>
</data>
<data name="UnitOfWorkManager_Construction_CannotBeNull" xml:space="preserve">
<value>{unitOfWorkManager} 构造参数 {fsql} 不能为 null</value>
</data>
<data name="UpdateError_Filter" xml:space="preserve">
<value>FreeSql.Repository Update 失败,因为设置了过滤器 {filterKey}: {filterValueExpression},更新的数据不符合{entityString}</value>
</data>
</root>