public Response <AppRatingDto> Save(AppRatingDto appRatingDto) { using (UnitOfWork unitOfWork = new UnitOfWork()) { return(unitOfWork.AppRatings.Save(appRatingDto, AppRatingMappers.Instance.MapToAppRatingDto)); } }
public HttpResponseMessage AddAppRating(AppRatingDto appRatingDto) { appRatingDto.CrudStatus = CrudStatus.CREATE; Response <AppRatingDto> response = appRatingManager.Save(appRatingDto); return(Request.CreateResponse <Response <AppRatingDto> >(HttpStatusCode.OK, response)); }
public AppRatingDto MapToAppRatingDto(SqlDataReader sqlDataReader) { AppRatingDto appRatingDto = new AppRatingDto(); appRatingDto.Id = sqlDataReader["Id"].ToInteger(); appRatingDto.DeviceId = sqlDataReader["DeviceId"].ToInteger(); appRatingDto.Rating = sqlDataReader["Rating"].ToInteger(); appRatingDto.CreateDate = sqlDataReader["CreateDate"].ToDateTime(); return(appRatingDto); }