public async Task <Rating> InsertAsync(RatingUpdateModel rating) { var result = await this.Context.AddAsync(this.Mapper.Map <DataAccess.Entities.Rating>(rating)); await this.Context.SaveChangesAsync(); return(this.Mapper.Map <Rating>(result.Entity)); }
public async Task <Rating> UpdateAsync(RatingUpdateModel rating) { var existing = await this.Get(rating); var result = this.Mapper.Map(rating, existing); this.Context.Update(result); await this.Context.SaveChangesAsync(); return(this.Mapper.Map <Rating>(result)); }
public Task <Rating> UpdateAsync(RatingUpdateModel rating) { return(RatingDataAccess.UpdateAsync(rating)); }
public Task <Rating> CreateAsync(RatingUpdateModel rating) { return(RatingDataAccess.InsertAsync(rating)); }