Esempio n. 1
0
        public Result AddGroup(Group group)
        {
            var result = new Result();

            if (!ValidateGroupName(group.Name))
            {
                result.Errors.Add("Invalid group name");
                return(result);
            }

            if (dataAccess.GroupExists(group.Name))
            {
                result.Errors.Add("Group with given name currently exists");
                return(result);
            }

            dataAccess.AddGroup(group);
            return(result);
        }