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); }
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); }