Пример #1
0
        /// <summary>
        /// Maps ReleaseJoke to ReleaseJokeDataModel.
        /// </summary>
        /// <param name="entity">ReleaseJoke</param>
        /// <returns>ReleaseJokeDataModel</returns>
        public static ReleaseJokeDataModel GetModel(this ReleaseJoke entity)
        {
            var model = new ReleaseJokeDataModel
            {
                Id = entity.Id,
                PublishDate = entity.PublishDate,
                Rating = entity.Rating,
                TextJoke = entity.TextJoke,
                UserEmail = entity.UserEmail,
                Censorship = entity.Censorship,
                Vote = entity.Vote,
                Favorite = entity.Favorite
            };

            return model;
        }
Пример #2
0
 private bool IsTopJokesBufferZoneNear(ReleaseJokeDataModel itemInList)
 {
     return itemInList.Equals(TopJokesMultiSelector.ItemsSource[TopJokesMultiSelector.ItemsSource.Count - OFFSET_KNOB]);
 }