public async Task <bool> UpdateMessage(Models.MessageDto messageDto) { //Map the DTO object into the data entity var recDb = Mapper.Map <Message>(messageDto); return(await _db.UpdateAsync(recDb)); }
public async Task <int> CreateMessage(Models.MessageDto messageDto) { //Map to the Data Entity object Message recDb = Mapper.Map <Message>(messageDto); //Insert into Message table await _db.InsertAsync(recDb); return(recDb.Id); }