public ActionResult <int> UpdateDaytimePrice(DaytimePrice daytimePrice) { int numberOfAffectedRows = _repository.UpdateDaytimePrice( daytimePrice.price_id, daytimePrice.daytime_id, daytimePrice ); return(Ok(numberOfAffectedRows)); }
public int UpdateDaytimePrice(int price_id, int daytime_id, DaytimePrice daytimePrice) { string script = ScriptsUtils.GetSqlScript("DaytimePrices\\UpdateDaytimePrice.sql"); var priceId = new SqlParameter("@priceId", price_id); var daytimeId = new SqlParameter("@daytimeId", daytime_id); var pricePerMinute = new SqlParameter("@pricePerMinute", daytimePrice.price_per_minute); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, priceId, daytimeId, pricePerMinute ); return(numberOfAffectedRows); }
public ActionResult <int> CreateDaytimePrice(DaytimePrice daytimePrice) { int numberOfAffectedRows = _repository.CreateDaytimePrice(daytimePrice); return(Ok(numberOfAffectedRows)); }