Пример #1
0
        public void AddMessage(Messages entityToAdd)
        {
            IMessagesRepository repo = new MessagesRepository(getEntities());

            Entities.Messages entityToAdd2 = Mapper.Map <Messages, Entities.Messages>(entityToAdd);
            repo.Add(entityToAdd2);
        }
Пример #2
0
        public void RemoveMessage(Messages entityToRemove)
        {
            IMessagesRepository repo = new MessagesRepository(getEntities());

            Entities.Messages entityToRemove2 = Mapper.Map <Messages, Entities.Messages>(entityToRemove);
            repo.Remove(entityToRemove2);
        }
Пример #3
0
        public int GetIdOfMessage(Messages entityToGetId)
        {
            IMessagesRepository repo = new MessagesRepository(getEntities());

            Entities.Messages entityToGetId2 = Mapper.Map <Messages, Entities.Messages>(entityToGetId);
            return(repo.GetMessageId(entityToGetId2));
        }
Пример #4
0
        public Messages GetMessageById(int entityToGetById)
        {
            IMessagesRepository repo = new MessagesRepository(getEntities());

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

            return(returnedValue2);
        }