Example #1
0
        public Group DeleteGroup(Group group)
        {
            if (GrupoNoValido(group))
            {
                throw new Exception();
            }

            List <Data.Models.Group> groupDAO = GroupMappers.DTOToDAOMapper(new List <Group> {
                group
            });

            _dbContext.DeleteGroup(groupDAO);

            return(group);
        }
Example #2
0
        public Group CreateGroup(Group group)
        {
            if (GrupoNoValido(group))
            {
                throw new Exception();
            }

            group.Id = $"Group-{llenar(_Id)}";
            _Id++;

            List <Data.Models.Group> groupDAO = GroupMappers.DTOToDAOMapper(new List <Group> {
                group
            });

            _dbContext.AddGroups(groupDAO);

            return(group);
        }