public async Task <List <DBBookingstatusResponse> > GetBookingStatusDB(Bookingstatus ObjBookingstatus) { var param = new SqlParameter[] { new SqlParameter() { ParameterName = "@userID", SqlDbType = System.Data.SqlDbType.VarChar, Size = 100, Direction = System.Data.ParameterDirection.Input, Value = string.IsNullOrEmpty(ObjBookingstatus.UserID)?String.Empty:ObjBookingstatus.UserID }, new SqlParameter() { ParameterName = "@userName", SqlDbType = System.Data.SqlDbType.VarChar, Size = 100, Direction = System.Data.ParameterDirection.Input, Value = string.IsNullOrEmpty(ObjBookingstatus.UserName)?String.Empty:ObjBookingstatus.UserName }, new SqlParameter() { ParameterName = "@EmailID", SqlDbType = System.Data.SqlDbType.VarChar, Size = 100, Direction = System.Data.ParameterDirection.Input, Value = string.IsNullOrEmpty(ObjBookingstatus.Email)?String.Empty:ObjBookingstatus.Email }, new SqlParameter() { ParameterName = "@PhoneNum", SqlDbType = System.Data.SqlDbType.VarChar, Size = 100, Direction = System.Data.ParameterDirection.Input, Value = string.IsNullOrEmpty(ObjBookingstatus.PhoneNum)?String.Empty:ObjBookingstatus.PhoneNum } }; string query = "sp_CustBookingStatus @userID,@userName,@EmailID,@PhoneNum"; var events = await _IDBLayercs.ExecuteAsyncTableProcedure <DBBookingstatusResponse>(param, query); return(events); //var _Context = new AuthenticationContext(); //var events = _Context.Set<DBBookingstatusResponse>().FromSqlRaw("sp_CustBookingStatus @userID,@userName,@EmailID,@PhoneNum", param).ToList(); //return events; }