コード例 #1
0
		/// <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);
		}
コード例 #2
0
		/// <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);
		}