FreeSql/FreeSql.DbContext/Properties/DbContextStrings.Designer.cs
2024-11-13 18:18:28 +08:00

376 lines
16 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// <auto-generated />
using System;
using System.Reflection;
using System.Resources;
using System.Globalization;
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);
private static CultureInfo _resourceCulture;
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
public static CultureInfo Culture
{
get
{
return _resourceCulture;
}
set
{
_resourceCulture = value;
}
}
/// <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,_resourceCulture);
for (var i = 0; i < formatterNames.Length; i++)
{
value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}");
}
return value;
}
}
}