News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

MCPD- Exam 70-516: Accessing Data with Microsoft .NET Framework 4

  1. DataTable dt = dataset.Tables["Customers"];
    string first = dt.Rows[0]["City"].ToString();
    string last = dt.Rows[dt.Rows.Count - 1]["City"].ToString();
  2. DataTable dt = dataset.Tables["Customers"];
    string first = dt.Rows[0]["City"].ToString();
    string last = dt.Rows[dt.Rows.Count]["City"].ToString();
  3. DataRelation relationFirst = dataset.Relations[0];
    DataRelation relationLast = dataset.Relations[dataset.Relations.Count - 1];
    string first = relationFirst.childTable.Columns["City"].ToString();
    string last = relationLast.childTable.Columns["City"].ToString();
  4. DataRelation relationFirst = dataset.Relations[0];
    DataRelation relationLast = dataset.Relations[dataset.Relations.Count];
    string first = relationFirst.childTable.Columns["City"].ToString();
    string last = relationLast.childTable.Columns["City"].ToString();
Answer: Answer is a

01DataSet customerOrders = new DataSet();
02customerOrders.EnforceConstraints = true;
03ForeignKeyConstraint ordersFK = new ForeignKeyConstraint("ordersFK",
04customerOrders.Tables["Customers"].Columns["CustomerID"],
05customerOrders.Tables["Orders"].Columns["CustomerID"]);
06
07customerOrders.Tables["Orders"].Constraints.Add(ordersFK);

You need to ensure that an exception is thrown when you attempt to delete Customer records that have related
Order records. Which code segment should you insert at line 06?

  1. ordersFK.DeleteRule = Rule.SetDefault;
  2. ordersFK.DeleteRule = Rule.None;
  3. ordersFK.DeleteRule = Rule.SetNull;
  4. ordersFK.DeleteRule = Rule.Cascade;
Answer: Answer is b

01DataColumn column = new DataColumn("UnitPrice", typeof(double));
02
03OrderDetailTable.Columns.Add(column);

You need to add a calculated DataColumn named UnitPrice to the OrderDetailTable object. You also need to ensure that UnitPrice is set to 0 when it cannot be calculated. Which code segment should you insert at line 02?

  1. column.Expression = "LineTotal/Quantity";
  2. column.Expression = "LineTotal/ISNULL(Quantity, 1)";
  3. column.Expression = "if(Quantity > 0, LineTotal/Quantity, 0)";
  4. column.Expression = "iif(Quantity > 0, LineTotal/Quantity, 0)";
Answer: Answer is d

createCustomer (Guid customerID, String customerName, String address1)

The application contains the following the following code segment. (Line numbers are included for reference only.)

01CustomDataContext context = new CustomDataContext();
02Guid userID = Guid.NewGuid();
03String address1 = "1 Main Steet";
04String name = "Marc";
05

You need to use the createCustomer stored procedure to add a customer to the database. Which code segment should you insert at line 05?

  1. context.createCustomer(userID, customer1, address1)
  2. context.ExecuteCommand("createCustomer", userID, customer1, address1); 
    Customer customer = new Customer() { ID = userID, Address1 = address1, Name = customer1, };
  3. context.ExecuteCommand("createCustomer", customer); 
    Customer customer = new Customer() { ID = userID, Address1 = address1, Name = customer1, };
  4. context.ExecuteQuery(typeof(Customer), "createCustomer", customer);
Answer: Answer is a

  1. context.SaveChanges(SaveOptions.AcceptAllChangesAfterSave);
  2. context.SaveChanges(SaveOptions.DetectChangesBeforeSave);
  3. context.SaveChanges(SaveOptions.None);
  4. context.SaveChanges();
Answer: Answer is b

  1. Call the Create method of the Customer object.

  2. Call the CreateObject method of the Customer object.

  3. Override the Create method for the Customer object.

  4. Override the SaveChanges method for the Customer object.

Answer: Answer is b

  1. Attach

  2. Refresh

  3. SaveChanges

  4. ApplyChanges

Answer: Answer is d

  1. Modify each mapped property to contain sealed and protected accessors.

  2. Modify each mapped property to contain non-sealed, public, and virtual accessors

  3. Configure the navigation property to return a type that implements the ICollection interface.

  4. Configure the navigation property to return a type that implements the IQueryable interface.

  5. Configure the navigation property to return a type that implements the IEntityWithRelationships interface.

Answer: Answer is b, c

  1. Set the ObjectTrackingEnabled property of DataContext to true.

  2. Set the DeferredLoadingEnabled property of DataContext to true.

  3. Call the SaveChanges method of DataContext with a value of false.

  4. Call the SubmitChanges method of DataContext with a value of System.Data.Linq.ConflictMode. ContinueOnConflict.

Answer: Answer is a

  1. Set ObjectTrackingEnabled to true on the DataContext class.

  2. Set ObjectTrackingEnabled to false on the DataContext class.

  3. Set DeferredLoadingEnabled to true on the DataContext class.

  4. Set DeferredLoadingEnabled to false on the DataContext class.

Answer: Answer is b

Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;