Card Set Information

2012-10-29 17:39:52
csad midterm

Show Answers:

  1. What does LINQ stand for?
    Language Integrated query
  2. What file was added to the VS project to anable database access?
  3. What config file was updated to the VS project?
    App.config Capital A
  4. What was added to the config file?
    the connecttion string
  5. In addition to the database model diagram, what other key file was created?
  6. What interface allow Linq access to standard operators to operate on objects like arrays?
  7. What standard query operators were demonstrated in the very first Linq exercise?
    • count()
    • average()
  8. Explain how the keyword var works in C#
    Could be anything
  9. What 3 things make up a LINQ'd query?
    • data source
    • query definition
    • query execution
  10. When referring to the Ado.Net Entity Framework, what is the "context object"?
    bridge to the database
  11. What 3 things are encapsulated by a context object?
    • connection
    • metadata
    • object state manager
  12. In our first database example what time of class was contained in the var variable 'selectedEmployees'?
    object query
  13. What is the role of the Ado.Net Entity Framework?
    object relational mapper
  14. What client side part of the framework is responsible for abstracting data to object?
  15. Does this client side technology talk directly to the data storage? Explain.
    No, it takes a snapshot of the database when you tell it to. Changes after will not be refelected in Model
  16. The framework generates 3 sets of metadata. What are they?
    • storage - lowest
    • mapping
    • conseptual - highest
  17. Which file houses the meta data?
  18. What other key element gets generated by the EDM in addition to the metedata?
  19. What symbol is used as the lambda operator in C#?
  20. Why is a lambda expression sometimes called an inline method?
    There is no argument list or return type
  21. What 2 db scenarios do we need to worry about for in Linq To Entities in this course?
    • firstOrDefault = 0 to 1 row
    • where
  22. Write a Linq to entitiy query using both an anonymous type and lamba expression to return all employee whose first name is "Sam"
    var samEmployees = dbContext.Employees.Where(emp => emp.FirstName == "Sam")
  23. What are the main benifits of using stored procs?
    • security
    • 1 place info change
    • faster
  24. When using the EDM to process stored procs, where is the System.Nullable type used?
    input parameters
  25. What syntax can we use instead of SystemNull<>
  26. What .net class is used to process output parameters?
    object parameters
  27. When using intellisence, how so you determine if a parameter is an input or output parameter?
    if the "?" shows up
  28. If you add a stored proc after creating the model, what must you ensure is done to create a function based on it?
    update the model from the database
  29. What two types of .net assemblies does the case studies use?
    • .exe
    • .dll
  30. How many logical layers do all database programs use?
    • 3
    • presentation
    • business
    • data
  31. How many physical layers do all database programs use?
    It depends on how many machines are involved
  32. What is the main benifit of a "Fat Client"?
    Runs faster
  33. Main benifit of a "Thin Client"?
    More secure
  34. What 2 things do you need to do in an .exe project to reference a .dll project?
    • (vb) add reference
    • imports
  35. Is a business user tier a client or a server?
  36. What 2 responsibilities of event driven programming reside with the business object?
    • Define event based on a delegate.
    • Actually raise the event
  37. What 2 responsibilities of event driven programming reside with teh consumer of the business object?
    • Register event handler
    • handle the even
  38. What is the AddressOf operator used for?
    Function pointer to method
  39. What is the constructor always called in the VB.Net class?
  40. What is the syntax for registering an event handler in VB.Net?
    Add handler
  41. Describe what a listview control is
    • multi column list box
    • multiple sets of data
  42. What attribute of the .xaml<Listview...> node is used to bind data in the listview control?
    DisplayMemberBinding = {...}
  43. Which property of the Listview control was loaded with data?
  44. What data type was laoded in the .itemsSource?
  45. What xaml sub nodes make up the menu control contents?
  46. True or False
    The nodes in a menuitem can be nested?
    • True
    • MenuItem within MenuItem
  47. Why would you want to use a dictionary instance to pass data between layers of an application?
  48. What layers will we be using a dictionary to pass data between the layers?
    The two Business layers
  49. What are the main differences between a dictionary and an array?
    key value relationship instead of an index relationship
  50. How do we declare an instance of a C#/VB dictionary?
    • string = key
    • object = value
  51. What data type is used in SQL server to reflect that a row has changed?
    Row Version
  52. What data type was used to Serialize the employee entity object?
  53. Describe what an optimistic concurrency strategey is?
    2 people cannot update the same data at the same time.
  54. What property was changed in the Data Model to reflect what we want the ADO Framework to flag changes have been made to a particular column in the model?
    Update property to "concurrency mode = fixed"
  55. T/F - Setting up a Log file must be done from an Administrator account?
    • True
    • writing to the registry
  56. What integral part of the Windows OS does the log file work with?
    Registry file
  57. What using was required to get at the Logging api's in C#?
  58. What class does EmployeeBusinessData inherit from?
  59. What two temporary references were made from the HelpdeskUI(vb) project?
    Why are they just temporary?
    • data.entity
    • c# .dll
    • architechture will not allow it
  60. EmployeeBusinessData
    What is contained in the byte array received by the Create method?
  61. EmployeeBusinessData
    What else is stored in the Dictionary besides the properties of the Employee class in the GetById method?
    • serializes entire employee class and adds it to the dictionary
    • entity byte[]
  62. EmployeeBusinessData
    How many times is the Deserializer routine called in the Update method?
  63. EmployeeBusinessData
    Describe how the update process works and how the OptimisticConcurreny exception is actually fired
    Deserialize the entity and saves the updated row to the dbContext. Once should work, second time should not.
  64. What is the main collection in the BrokenRules class?
  65. What is stored as the "key" in the dictionary
    • name of the rule
    • boolean is the value
  66. What does the business object do in it's constructor to the BrokenRules object after instantiation?
    break all the rules on purpose
  67. What is the significance of having a non-zero count in the dictionary?
    What happens when the count reaches zero?
    • non-zero = object state is not good
    • when it is zero = you are in a good state