Esempio n. 1
0
 public static DalLike ToDalLike(this ServiceLike like)
 {
     return(new DalLike
     {
         ID = like.ID,
         BookID = like.BookID,
         UserID = like.UserID,
         Like = like.Like
     });
 }
Esempio n. 2
0
 public void RemoveLike(ServiceLike like)
 {
     unit.Likes.Delete(like.ToDalLike());
     unit.Save();
 }
Esempio n. 3
0
 public void AddLike(ServiceLike like)
 {
     unit.Likes.Create(like.ToDalLike());
     unit.Save();
 }
Esempio n. 4
0
 public void UpdateLike(ServiceLike like)
 {
     unit.Likes.Update(like.ToDalLike());
     unit.Save();
 }