Exemplo n.º 1
0
        public void AddGrade(Grades entityToAdd)
        {
            IGradesRepository repo = new GradesRepository(getEntities());

            Entities.Grades entityToAdd2 = Mapper.Map <Grades, Entities.Grades>(entityToAdd);
            repo.Add(entityToAdd2);
        }
Exemplo n.º 2
0
        public int GetIdOfGrade(Grades entityToGetId)
        {
            IGradesRepository repo = new GradesRepository(getEntities());

            Entities.Grades entityToGetId2 = Mapper.Map <Grades, Entities.Grades>(entityToGetId);
            return(repo.GetGradeId(entityToGetId2));
        }
Exemplo n.º 3
0
        public void RemoveGrade(Grades entityToRemove)
        {
            IGradesRepository repo = new GradesRepository(getEntities());

            Entities.Grades entityToRemove2 = Mapper.Map <Grades, Entities.Grades>(entityToRemove);
            repo.Remove(entityToRemove2);
        }
Exemplo n.º 4
0
        public Grades GetGradeById(int entityToGetById)
        {
            IGradesRepository repo = new GradesRepository(getEntities());

            Entities.Grades returnedValue  = repo.GetById(entityToGetById);
            Grades          returnedValue2 = Mapper.Map <Entities.Grades, Grades>(returnedValue);

            return(returnedValue2);
        }