Exemple #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);
        }
Exemple #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);
        }
Exemple #3
0
 public List <Group> GetAllGroups()
 {
     return(GroupMappers.DAOToDTOMapper(_dbContext.GetAllGroups()));
 }