public async Task <int> UpdateUserInQueue(SalonQueue salonQueue) { var retVal = 0; using (IDbConnection conn = Connection) { DynamicParameters _params = new DynamicParameters(); _params.Add("@SalonUserId", salonQueue.SalonUserId, DbType.Int32, direction: ParameterDirection.Input); _params.Add("@ArriveTime", salonQueue.ArriveTime, DbType.DateTime, direction: ParameterDirection.Input, 50); var result = await conn.ExecuteAsync("[dbo].UpdateUserInQueue", _params, null, null, CommandType.StoredProcedure).ConfigureAwait(false); } return(retVal); }
public async Task <ActionResult <int> > UpdateUserInQueue(int salonQueueId, [FromBody] SalonQueue salonQueue) { salonQueue.SalonQueueId = salonQueueId; return(await _salonUsersQueueRepo.UpdateUserInQueue(salonQueue)); }
public async Task <ActionResult <int> > AddUserToQueue([FromBody] SalonQueue salonQueue) { return(await _salonUsersQueueRepo.AddUserToQueue(salonQueue)); }