namespace  App.Contracts.ChangeHandlers
{
    using DataModels;
    using Contracts;
	using System.Linq;

    public interface IExamResultChangeHandler
    {
        /// <summary>
        /// Called when [create].
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="context">The context.</param>
        void BeforeCreate(IExamResultDataModel item, IModelContext context);

        /// <summary>
        /// Called when [create].
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="context">The context.</param>
        void AfterCreate(IExamResultDataModel item, IModelContext content);
       
        /// <summary>
        /// Called after a ExamResult is deleted
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="context">The context.</param>
        void BeforeDelete(int id, IModelContext context);
                
        /// <summary>
        /// Called before a ExamResult is deleted
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="context">The context.</param>        
        void AfterDelete(int id, IModelContext context);

        /// <summary>
        /// Called before a ExamResult is updated
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="context">The context.</param>
        void BeforeUpdate(IExamResultDataModel item, IModelContext context);

        /// <summary>
        /// Called after a ExamResult is updated
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="context">The context.</param>
        void AfterUpdate(IExamResultDataModel item, IModelContext context);        

        		
		#region 'DelegateExamResult'	
		/// <summary>
        /// Adds the examresult to delegate for 'DelegateExamResult' relationship.
        /// </summary>
		void BeforeAddDelegateToExamResultForDelegateExamResult(int examresultId, int delegateId, IModelContext context);

		/// <summary>
        /// Adds the examresult to delegate for 'DelegateExamResult' relationship.
        /// </summary>
		void AfterAddDelegateToExamResultForDelegateExamResult(int examresultId, int delegateId, IModelContext context);

		/// <summary>
        /// Removes the examresult from delegate for 'DelegateExamResult' relationship.
        /// </summary>
		void BeforeRemoveDelegateFromExamResultForDelegateExamResult(int examresultId, int delegateId, IModelContext context);

		/// <summary>
        /// Removes the examresult from delegate for 'DelegateExamResult' relationship.
        /// </summary>
		void AfterRemoveDelegateFromExamResultForDelegateExamResult(int examresultId, int delegateId, IModelContext context); 

		/// <summary>
        /// Get all ExamResult for 'DelegateExamResult' relationship.
        /// </summary>
		void BeforeGetAllForDelegateExamResult(int delegateId, IModelContext context);
		
		/// <summary>
        /// Get all ExamResult for 'DelegateExamResult' relationship.
        /// </summary>
		void AfterGetAllForDelegateExamResult(IQueryable<IExamResultDataModel> results, int delegateId, IModelContext context);
		#endregion 	
		
		#region 'ExamExamResult'	
		/// <summary>
        /// Adds the examresult to exam for 'ExamExamResult' relationship.
        /// </summary>
		void BeforeAddExamToExamResultForExamExamResult(int examresultId, int examId, IModelContext context);

		/// <summary>
        /// Adds the examresult to exam for 'ExamExamResult' relationship.
        /// </summary>
		void AfterAddExamToExamResultForExamExamResult(int examresultId, int examId, IModelContext context);

		/// <summary>
        /// Removes the examresult from exam for 'ExamExamResult' relationship.
        /// </summary>
		void BeforeRemoveExamFromExamResultForExamExamResult(int examresultId, int examId, IModelContext context);

		/// <summary>
        /// Removes the examresult from exam for 'ExamExamResult' relationship.
        /// </summary>
		void AfterRemoveExamFromExamResultForExamExamResult(int examresultId, int examId, IModelContext context); 

		/// <summary>
        /// Get all ExamResult for 'ExamExamResult' relationship.
        /// </summary>
		void BeforeGetAllForExamExamResult(int examId, IModelContext context);
		
		/// <summary>
        /// Get all ExamResult for 'ExamExamResult' relationship.
        /// </summary>
		void AfterGetAllForExamExamResult(IQueryable<IExamResultDataModel> results, int examId, IModelContext context);
		#endregion 	
    }
}