public static OperationLogEntity ToDataModel(this OperationLog log)
		{
			var retVal = new OperationLogEntity();
			retVal.InjectFrom(log);
			retVal.OperationType = log.OperationType.ToString();
			return retVal;
		}
		public static void Patch(this OperationLogEntity source, OperationLogEntity target)
		{
			if (target == null)
				throw new ArgumentNullException("target");

			var patchInjection = new PatchInjection<OperationLogEntity>(x => x.ModifiedBy, x => x.ModifiedDate, x=>x.Detail);
			target.InjectFrom(patchInjection, source);
		}
        /// <summary>
        /// States the entry2 operation log.
        /// </summary>
        /// <param name="objectType">Type of the object.</param>
        /// <param name="createdDate">The createdDate.</param>
        /// <param name="objectId">The key value.</param>
        /// <param name="state">The state.</param>
        /// <returns>
        /// OperationLog object
        /// </returns>
        private OperationLogEntity StateEntry2OperationLog(string objectType, DateTime createdDate, string objectId, EntityState state)
        {
            var retVal = new OperationLogEntity
            {
                Id = Guid.NewGuid().ToString("N"),
                CreatedDate = createdDate,
                ObjectId = objectId,
                ObjectType = objectType,
                CreatedBy = CurrentPrincipal.GetCurrentUserName(),
                OperationType = state.ToString()
            };

            return retVal;
        }
        /// <summary>
        /// States the entry2 operation log.
        /// </summary>
        /// <param name="objectType">Type of the object.</param>
        /// <param name="createdDate">The createdDate.</param>
        /// <param name="objectId">The key value.</param>
        /// <param name="state">The state.</param>
        /// <returns>
        /// OperationLog object
        /// </returns>
        private OperationLogEntity StateEntry2OperationLog(string objectType, DateTime createdDate, string objectId, EntityState state)
        {
            var retVal = new OperationLogEntity
            {
                ObjectId = objectId,
                ObjectType = objectType,
                OperationType = state.ToString()
            };

            return retVal;
        }
 public virtual void Patch(OperationLogEntity target)
 {
     target.Detail = Detail;
 }