示例#1
0
 public Quest Create(Quest q)
 {
     //business rule
     //user == admin role
     //allow the quest.completed
     return(_repo.Create(q));
 }
        public Quest Create(Quest q)
        {
            // business rule
            // user == role general
            // allow the quest.completed

            if (!Roles.General.HasFlag(_accountService.User.Role))
            {
                q.Completed = false;
            }
            q.UserId = _accountService.User.Id;
            return(_repo.Create(q));
        }
示例#3
0
 internal Quest Create(Quest questData)
 {
     _qreop.Create(questData);
     return(questData);
 }