Example #1
0
 public static Comment ToOrmComment(this DalComment comment)
 {
     return(new Comment()
     {
         Id = comment.Id,
         Author = comment.Author.ToOrmAuthor(),
         PhotoId = comment.PhotoId,
         Posted = comment.Posted,
         Text = comment.Text
     });
 }
Example #2
0
 public void Insert(DalComment entity)
 {
     _context.Comments.Add(Mapper.CreateMap().Map <Comment>(entity));
     _context.SaveChanges();
 }