/// <summary>
        /// To the view model.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <returns></returns>
        public static MailPermissionViewModel ToViewModel(this MailPermissionModel model)
        {
            if (model == null)
            {
                return(null);
            }

            var entity = new MailPermissionViewModel
            {
                MailPermissionID = model.MailPermissionID,
                MailPermission   = model.MailPermission
            };

            return(entity);
        }
        /// <summary>
        /// To the model.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns></returns>
        public static MailPermissionModel ToModel(this MailPermissionViewModel entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var model = new MailPermissionModel
            {
                MailPermissionID = entity.MailPermissionID,
                MailPermission   = entity.MailPermission
            };

            return(model);
        }