Example #1
0
        private void AddManager(Managers entityToAdd)
        {
            IManagersRepository repo = new ManagersRepository(getEntities());

            Entities.Managers entityToAdd2 = Mapper.Map <Managers, Entities.Managers>(entityToAdd);
            repo.Add(entityToAdd2);
        }
Example #2
0
        public void RemoveManager(Managers entityToRemove)
        {
            IManagersRepository repo = new ManagersRepository(getEntities());

            Entities.Managers entityToRemove2 = Mapper.Map <Managers, Entities.Managers>(entityToRemove);
            repo.Remove(entityToRemove2);
        }
Example #3
0
        public int GetIdOfManager(Managers entityToGetId)
        {
            IManagersRepository repo = new ManagersRepository(getEntities());

            Entities.Managers entityToGetId2 = Mapper.Map <Managers, Entities.Managers>(entityToGetId);
            return(repo.GetManagerId(entityToGetId2));
        }
Example #4
0
        public Managers GetManagerById(int entityToGetById)
        {
            IManagersRepository repo = new ManagersRepository(getEntities());

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

            return(returnedValue2);
        }