Which keyword missing in this code block?
public async Task<string> GetStringFromUrl(string url)
{
using (var httpClient = new System.Net.Http.HttpClient())
{
var result = httpClient.GetStringAsync(url);
return result;
}
}
Type in the missing keyword:
How many queries are executed against the database when the GetTotals method is executed?
class Db
{
private readonly CustomerContextDb Db = new CustomerContextDb();
private IQueryable<Customer> GetCustomers()
{
return Db.Customers;
}
private IQueryable<Sale> GetSales()
{
return from s in Db.Sales
where s.IsPaid
select s;
}
public IList<Total> GetTotals()
{
var totals = (
from s in GetSales()
join c in GetCustomers() on s.CustomerId equals c.CustomerId
group s.Amount by c into g
select new {
g.Key.CustomerId,
g.Key.FirstName,
g.Key.LastName,
TotalAmount = g.Sum(a => a)
}).ToList();
}
}
Select one answer:
This table data is used for both SQL queries.
TableAB:
column1 |
---|
A |
B |
B |
TableBC:
column1 |
---|
B |
C |
How many entries will return following query?
SELECT column1 FROM TableAB
UNION
SELECT column1 FROM TableBC
Select one option:
How many entries will return following query?
SELECT column1 FROM (
SELECT column1 FROM TableAB
UNION
SELECT column1 FROM TableBC ) T
GROUP BY column1
HAVING count(1) = 1
Select one option:
Consider the two functions below. Will they both return the same thing?
// JavaScript source code
function A() {
return {
bar: "hello"
};
}
function B() {
return
{
bar: "hello"
};
}
Select one option:
Which keyword is strictly prohibited in class declaration section?