Case Study: 2
Scenario 2
Background
You are developing an online shopping web application.
Business Requirements
A user is not required to provide an email address. If a user enters an email address, it must be verified to be
a valid email address.
Information about the first product on the product page must fade out over time to encourage the user to
continue browsing the catalog. Administrators must be able to edit information about existing customers.
Administrators also must be able to specify a default product on the product page.
Technical Requirements
General:
The web store application is in a load-balanced web farm. The load balancer is not configured to useserver
affinity.
The web store application is an ASP.NET MVC application written in Visual Studio 2012.
Products:
The value of the productId property must always be greater than 0. The Products page for mobile devices
must display to mobile users. The Products page fordesktop devices must display to desktop users.
Storage:
The data must be stored in a serialized XML data format.
Serialized objects must be schema-independent.
Exception handling:
Exceptions originating from IIS must display a page with support contact information.
Some page links expire, and users who access these links encounter 404 errors. Exceptions must be
logged by using the WriteLog method of the Utility class.
Browser and device support:
The application must support image format conversions from .bmp to .jpeg for mobile devices.
The application must support image format conversions from .bmp to .png for desktop devices.
Application Structure
********************************************************************
You need to ensure that new customers enter a validemail address. Which code should you use? (Each
correct answer presents part of the solution. Choose all that apply.)

A.
Option A
B.
Option B
C.
Option C
D.
Option D
Correct answer should be A and D.
Complex type isn’t even allowed on a property, only on classes.
1
0
https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.dataannotations.schema.complextypeattribute?view=netframework-4.8
Complex types do not have keys and cannot be managed by the Entity Framework apart from the parent object.
0
0
I partially agree with H, but ’emailPattern’ isn’t defined. So it should be a mix of A&B plus D. So there’s no correct answer possible.
Correct me if I’m wrong.
0
0
I Also think A & D are better, as the ErrorMessageResourceType = DataType.EmailAddress doesn´t make sense either
0
0
Answers should be B and D.
Everyone agrees about D.
B is correct because EmailRegex is a constant as displayed in the question.
0
0
http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.regularexpressionattribute(v=vs.110).aspx
RegularExpression attribute takes a constant as a param.
0
0
Its A and D
0
0
Its A and D. incorrect choice
0
0
A and D from here too.
0
0
La repsuestas correcta es la A Y D lo que pasa no lo han escrito bien .. por que no
maneja un recoursetype que sea de dataype.emailaddres ya que este pertenece este parametro
a mis archivos de recursos…
la “A” -> es correcta por que separa el datatype de mi anotacion regularezpression..
0
0
Acuerdnese que es un mensaje de mi archivo resource.resx cuando pone el ErrorMessageResourceType . el valor que reciba debe ser mi archivo de recursos
0
1
ComplexType is allowed on property as EF CodeFirst approach.
If we are using Datatype.EmailAddress then we have to use Html.EditorFor
this validation won’t work if you are using Html.Textbox
its because Datatype.EmailAddress tells that datatype is email not validation. ie
this will render as <input type="email" and validation is done by HTML5 supported browser that means if you use ur code on old browser validation will not happen
check this url for same issue
http://stackoverflow.com/questions/26316508/
Option A is incorrect in this case since we don't have EditorFor in option
0
0
BTW, part of that new 231Q 70-486 dumps FYI:
https://drive.google.com/open?id=0B-ob6L_QjGLpflNtUWtkNlk3ODJFY0pqOUhqVFEwc0lrd0QtamRxUHFLLUdWZEVDaGtlQWM
Best Regards!
0
0