private RatingDM Map(RatingSM rating) { RatingDM video = new RatingDM(); video.RateId = rating.RateId.ToString(); video.Rating = rating.Rating; return(video); }
private RatingSM Map(RatingDM rating) { RatingSM video = new RatingSM(); video.RateId = Convert.ToInt32(rating.RateId); video.Rating = rating.Rating; return(video); }
public void EditRatingById(RatingSM rating) { try { ratingData.EditRatingById(Map(rating)); logs.LogError("Event ", "User was able to update Rating", "Class:RatingLogic, Method:UpdateRatingByRateId"); } catch (Exception e) { logs.LogError("Error ", "User was unable to update Rating", "Class:RatingLogic, Method:UpdateRatingByRateId"); } }
public string GetRating(int id) { RatingSM rating = Map(ratingData.GetRatingById(id)); return(rating.Rating); }