public void Log(LogEntity logEntity) { SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ApplicationName", _applicationName), new SqlParameter("@FunctionName", logEntity.FunctionName), new SqlParameter("@EventType", (int)logEntity.LogEventType), new SqlParameter("@Detail", logEntity.Detail) }; _sqlAccess.ExecuteNonQuery(LogQueries.INSERT_LOG, parameters); }
public void InsertUserAccount(Account accountData, string userId) { foreach (AccountData account in accountData.account) { List <SqlParameter> parameters = new List <SqlParameter>(); parameters.Add(new SqlParameter("UserID", userId)); parameters.Add(new SqlParameter("ProviderName", account.providerName)); parameters.Add(new SqlParameter("CurrentBalance", account.currentBalance.amount)); parameters.Add(new SqlParameter("AvailableCredit", account.availableCredit.amount)); parameters.Add(new SqlParameter("AccountType", account.accountType)); parameters.Add(new SqlParameter("AccountNumber", account.accountNumber)); parameters.Add(new SqlParameter("AccountName", account.accountName)); parameters.Add(new SqlParameter("LoginName", account.providerAccountId)); access.ExecuteNonQuery("dbo.UserAccount_Set", parameters); } }
public void Update(Entity entity, string PKName) { SqlQuery query = GetUpdateQuery(entity, PKName); _sqlAccess.ExecuteNonQuery(query.Query, query.parameters.ToArray()); }