public void AddMessage(Messages entityToAdd) { IMessagesRepository repo = new MessagesRepository(getEntities()); Entities.Messages entityToAdd2 = Mapper.Map <Messages, Entities.Messages>(entityToAdd); repo.Add(entityToAdd2); }
public void RemoveMessage(Messages entityToRemove) { IMessagesRepository repo = new MessagesRepository(getEntities()); Entities.Messages entityToRemove2 = Mapper.Map <Messages, Entities.Messages>(entityToRemove); repo.Remove(entityToRemove2); }
public int GetIdOfMessage(Messages entityToGetId) { IMessagesRepository repo = new MessagesRepository(getEntities()); Entities.Messages entityToGetId2 = Mapper.Map <Messages, Entities.Messages>(entityToGetId); return(repo.GetMessageId(entityToGetId2)); }
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); }