public IEnumerable <TransactionType> GetAllTransactionTypes() { string script = ScriptsUtils.GetSqlScript("TransactionTypes\\GetAllTransactionTypes.sql"); IEnumerable <TransactionType> transactionTypes = _context.TransactionTypes.FromSqlRaw(script); return(transactionTypes); }
public IEnumerable <TransactionView> GetTransactionsTable() { string script = ScriptsUtils.GetSqlScript("Transactions\\GetTransactionsTable.sql"); IEnumerable <TransactionView> transactions = _context.TransactionView.FromSqlRaw(script); return(transactions); }
public IEnumerable <Organisation> GetAllOrganisations() { string script = ScriptsUtils.GetSqlScript("Organisations\\GetAllOrganisations.sql"); IEnumerable <Organisation> organisations = _context.Organisations.FromSqlRaw(script); return(organisations); }
public IEnumerable <Price> GetAllPrices() { string script = ScriptsUtils.GetSqlScript("Prices\\GetAllPrices.sql"); IEnumerable <Price> prices = _context.Prices.FromSqlRaw(script); return(prices); }
public IEnumerable <Locality> GetAllLocalities() { string script = ScriptsUtils.GetSqlScript("Localities\\GetAllLocalities.sql"); IEnumerable <Locality> localitys = _context.Localities.FromSqlRaw(script); return(localitys); }
public IEnumerable <PriceView> GetPricesTable() { string script = ScriptsUtils.GetSqlScript("Prices\\GetPricesTable.sql"); IEnumerable <PriceView> prices = _context.PriceView.FromSqlRaw(script); return(prices); }
public IEnumerable <Account> GetAllAccounts() { string script = ScriptsUtils.GetSqlScript("Accounts\\GetAllAccounts.sql"); IEnumerable <Account> accounts = _context.Accounts.FromSqlRaw(script); return(accounts); }
public int Seed() { string script = ScriptsUtils.GetSqlScript("Seed.sql"); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw(script); return(numberOfAffectedRows); }
public IEnumerable <Call> GetAllCalls() { string script = ScriptsUtils.GetSqlScript("Calls\\GetAllCalls.sql"); IEnumerable <Call> calls = _context.Calls.FromSqlRaw(script); return(calls); }
public IEnumerable <AccountView> GetAccountsTable() { string script = ScriptsUtils.GetSqlScript("Accounts\\GetAccountsTable.sql"); IEnumerable <AccountView> accounts = _context.AccountView.FromSqlRaw(script); return(accounts); }
public IEnumerable <SubscriberView> GetSubscribersTable() { string script = ScriptsUtils.GetSqlScript("Subscribers\\GetSubscribersTable.sql"); IEnumerable <SubscriberView> subscribers = _context.SubscriberView.FromSqlRaw(script); return(subscribers); }
public IEnumerable <Subscriber> GetAllSubscribers() { string script = ScriptsUtils.GetSqlScript("Subscribers\\GetAllSubscribers.sql"); IEnumerable <Subscriber> subscribers = _context.Subsrcibers.FromSqlRaw(script); return(subscribers); }
public IEnumerable <Daytime> GetAllDaytimes() { string script = ScriptsUtils.GetSqlScript("Daytimes\\GetAllDaytimes.sql"); IEnumerable <Daytime> daytimes = _context.Daytimes.FromSqlRaw(script); return(daytimes); }
public IEnumerable <DaytimePriceView> GetDaytimePricesTable() { string script = ScriptsUtils.GetSqlScript("DaytimePrices\\GetDaytimePricesTable.sql"); IEnumerable <DaytimePriceView> daytimePrices = _context.DaytimePriceView.FromSqlRaw(script); return(daytimePrices); }
public IEnumerable <Call> GetCallsBySubscriberId(int subscriber_id) { string script = ScriptsUtils.GetSqlScript("Calls\\GetCallsBySubscriberId.sql"); var subscriberId = new SqlParameter("@subscriberId", subscriber_id); IEnumerable <Call> calls = _context.Calls.FromSqlRaw( script, subscriberId ); return(calls); }
public IEnumerable <DaytimePrice> GetDaytimePricesByPriceId(int price_id) { string script = ScriptsUtils.GetSqlScript("DaytimePrices\\GetDaytimePricesByPriceId.sql"); var priceId = new SqlParameter("@priceId", price_id); IEnumerable <DaytimePrice> daytimePrices = _context.DaytimePrices.FromSqlRaw( script, priceId ); return(daytimePrices); }
public async Task <Organisation> GetOrganisationById(int id) { string script = ScriptsUtils.GetSqlScript("Organisations\\GetOrganisationById.sql"); var organisationId = new SqlParameter("@organisationId", id); Organisation organisation = await _context.Organisations.FromSqlRaw( script, organisationId ).FirstAsync(); return(organisation); }
public int DeleteSubscriber(int id) { string script = ScriptsUtils.GetSqlScript("Subscribers\\DeleteSubscriber.sql"); var subscriberId = new SqlParameter("@subscriberId", id); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, subscriberId ); return(numberOfAffectedRows); }
public int CreateTransactionType(TransactionType transactionType) { string script = ScriptsUtils.GetSqlScript("TransactionTypes\\CreateTransactionType.sql"); var title = new SqlParameter("@title", transactionType.title); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, title ); return(numberOfAffectedRows); }
public async Task <Call> GetCallById(int id) { string script = ScriptsUtils.GetSqlScript("Calls\\GetCallById.sql"); var callId = new SqlParameter("@callId", id); Call call = await _context.Calls.FromSqlRaw( script, callId ).FirstAsync(); return(call); }
public int RestoreCall(int call_id) { string script = ScriptsUtils.GetSqlScript("Calls\\RestoreCall.sql"); var callId = new SqlParameter("@callId", call_id); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, callId ); return(numberOfAffectedRows); }
public int CreateOrganisation(Organisation organisation) { string script = ScriptsUtils.GetSqlScript("Organisations\\CreateOrganisation.sql"); var name = new SqlParameter("@name", organisation.name); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, name ); return(numberOfAffectedRows); }
public async Task <Locality> GetLocalityById(int id) { string script = ScriptsUtils.GetSqlScript("Localities\\GetLocalityById.sql"); var localityId = new SqlParameter("@localityId", id); Locality locality = await _context.Localities.FromSqlRaw( script, localityId ).FirstAsync(); return(locality); }
public int DeleteLocality(int id) { string script = ScriptsUtils.GetSqlScript("Localities\\DeleteLocality.sql"); var localityId = new SqlParameter("@localityId", id); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, localityId ); return(numberOfAffectedRows); }
public int CreateLocality(Locality locality) { string script = ScriptsUtils.GetSqlScript("Localities\\CreateLocality.sql"); var name = new SqlParameter("@name", locality.name); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, name ); return(numberOfAffectedRows); }
public async Task <Price> GetPriceById(int id) { string script = ScriptsUtils.GetSqlScript("Prices\\GetPriceById.sql"); var priceId = new SqlParameter("@priceId", id); Price price = await _context.Prices.FromSqlRaw( script, priceId ).FirstAsync(); return(price); }
public int DeleteOrganisation(int id) { string script = ScriptsUtils.GetSqlScript("Organisations\\DeleteOrganisation.sql"); var organisationId = new SqlParameter("@organisationId", id); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, organisationId ); return(numberOfAffectedRows); }
public async Task <TransactionType> GetTransactionTypeById(int id) { string script = ScriptsUtils.GetSqlScript("TransactionTypes\\GetTransactionTypeById.sql"); var transactionTypeId = new SqlParameter("@transactionTypeId", id); TransactionType transactionType = await _context.TransactionTypes.FromSqlRaw( script, transactionTypeId ).FirstAsync(); return(transactionType); }
public int DeleteTransactionType(int id) { string script = ScriptsUtils.GetSqlScript("TransactionTypes\\DeleteTransactionType.sql"); var transactionTypeId = new SqlParameter("@transactionTypeId", id); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, transactionTypeId ); return(numberOfAffectedRows); }
public int DeletePrice(int id) { string script = ScriptsUtils.GetSqlScript("Prices\\DeletePrice.sql"); var priceId = new SqlParameter("@priceId", id); int numberOfAffectedRows = _context.Database.ExecuteSqlRaw( script, priceId ); return(numberOfAffectedRows); }