public List <UserMessage> GetByUser(UserMessage message) { var dbRecord = Container.Table_Message.Where(x => x.UserId.Equals(message.UserId)); List <UserMessage> result = new List <UserMessage>(); dbRecord.ToList().ForEach(x => result.Add(UserMessageMapper.Convert(x))); return(result); }
public UserMessage Get(UserMessage record) { var dbRecord = Container.Table_Message.Find(record.Id); return(UserMessageMapper.Convert(dbRecord)); }