Example #1
0
        public async Task <UserRuleAcknowledgement> CreateUserRuleAcknowledgement(IUserRuleAcknowledgementRequest request)
        {
            var entity = MapUserRuleAcknowledgement(request);

            var result = await _userRuleAcknowledgementRepository.Add(entity);

            return(MapUserRuleAcknowledgement(result));
        }
Example #2
0
        private static Domain.Entities.UserRuleNotification MapUserRuleAcknowledgement(IUserRuleAcknowledgementRequest request)
        {
            var userRuleNotification = new UserRuleAcknowledgement(request.Id, request.RuleId, request.TypeOfRule);

            return(new Domain.Entities.UserRuleNotification
            {
                CourseRuleId = userRuleNotification.CourseRuleId,
                GlobalRuleId = userRuleNotification.GlobalRuleId,
                UkPrn = userRuleNotification.UkPrn,
                UserId = userRuleNotification.UserId
            });
        }