当前位置: 首页>>代码示例>>C#>>正文


C# Record.ClearFromCache方法代码示例

本文整理汇总了C#中Record.ClearFromCache方法的典型用法代码示例。如果您正苦于以下问题:C# Record.ClearFromCache方法的具体用法?C# Record.ClearFromCache怎么用?C# Record.ClearFromCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Record的用法示例。


在下文中一共展示了Record.ClearFromCache方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DoDelete

		/// <summary>
		/// Deletes an existing <paramref name="record"/> from this repository.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="record">The <see cref="Record"/> which will be deleted.</param>
		protected override void DoDelete(IMansionContext context, Record record)
		{
			// execute in the decorated repository
			DecoratedRepository.Delete(context, record);

			// clear the cache for the given record
			record.ClearFromCache(context, cachingService);
		}
开发者ID:Erikvl87,项目名称:Premotion-Mansion,代码行数:13,代码来源:CachingRepositoryDecorator.cs

示例2: DoUpdate

		/// <summary>
		/// Updates an existing <paramref name="record"/> in this repository.
		/// </summary>
		/// <param name="context">The <see cref="IMansionContext"/>.</param>
		/// <param name="record">The <see cref="Record"/> which will be updated.</param>
		/// <param name="properties">The updated properties.</param>
		protected override void DoUpdate(IMansionContext context, Record record, IPropertyBag properties)
		{
			// execute in the decorated repository
			DecoratedRepository.Update(context, record, properties);

			// clear the cache for the given record
			record.ClearFromCache(context, cachingService);
		}
开发者ID:Erikvl87,项目名称:Premotion-Mansion,代码行数:14,代码来源:CachingRepositoryDecorator.cs


注:本文中的Record.ClearFromCache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。