70 680 Test King, 70 680 Tips
QUESTION NO: 66
You add a table to the database to track changes to part names. The table stores the following row values: the username of the user who made the change a part ID the new part name a DateTime value
You need to enable detection of unauthorized changes to the row values. You also need to ensure that database users can view the original row values.
What should you do?
68
A. Add a column named signature. Use System.Security.Cryptography.RSA to create a signature for all of the row values. Store the signature in the signature column. Publish only the public key internally.
B. Add a column named hash. Use System.Security.Cryptography.MD5 to create an MD5 hash of the row values, and store the hash in the hash column.
C. Use System.Security.Cryptography.DES to encrypt all the row values using an encryption key held by the application.
D. Use System.Security.Cryptography.RSA to encrypt all the row values. Publish only the public key internally.
Answer: A
Explanation:
QUESTION NO: 67
You need to ensure that an exception is thrown when color names are set to less than two characters.
What should you do?
A. Add the following method to the Color partial class in Model\Color.cs: protected override void OnPropertyChanged(string property)
if (property == "Name" && this.Name.Length < 2)
throw new ArgumentOutOfRangeException("Name must be at least two characters");
B. Add the following attribute to the Name property of the Color class in the entity designer file: [StringLength(256, MinimumLength = 2)]
C. Add the following code segment to the ContosoEntities partial class in Model\ContosoEntities.cs:
public override int SaveChanges(System.Data.Objects.SaveOptions options)
if (change.Entity is Color)
if (((Color)change.Entity).Name.Length < 2) throw new ArgumentException("Name too short");
return base.SaveChanges(options);
D. Add the following method to the Color partial class in Model\Color.cs: protected override void OnPropertyChanging(string property)
69
if (property == "Name" && this.Name.Length < 2)
throw new ArgumentOutOfRangeException("Name must be at least two characters");
Answer: C
Explanation:
QUESTION NO: 68
Refer to the following lines in the case study: PA40 in \Model\Part.cs, PR16 in \Model\Product.cs, and CT14 in \Model\Component.cs.
The application must create XML files that detail the part structure for any product. The XML files must use the following format:
You need to update the application to support the creation of an XElement object having a structure that will serialize to the format shown above.
What should you do? (Each correct answer presents part of the solution. Choose two.)
A. return new XElement("component", new XAttribute("name", this.Name),
new XAttribute("description", this.Description),
70
new XAttribute("partType", this.PartType));
Insert the following code segment at line CT14 in \Model\Component.cs:
B. return new XElement("component", new XAttribute("name", this.Name), new XElement("description", this.Description),
new XElement("partType", this.PartType));
Insert the following code segment at line CT14 in \Model\Component.cs:
C. return new XElement("component", new XElement("name", this.Name), new XElement("description", this.Description),
new XElement("partType", this.PartType));
Insert the following code segment at line PR16 in \Model\Product.cs:
D. return new XElement("product", new XAttribute("name", this.Name),
new XAttribute("description", this.Description),
new XAttribute("productType", this.ProductType));
Insert the following code segment at line PR16 in \Model\Product.cs:
E. return new XElement("product", new XAttribute("name", this.Name),
new XElement("description", this.Description),
new XElement("productType", this.ProductType));
Insert the following code segment at line PR16 in \Model\Product.cs:
F. return new XElement("product", new XElement("name", this.Name),
new XElement("description", this.Description),
new XElement("productType", this.ProductType));
Answer: A,D
Explanation:







