Specification
Specification
Specification
truYum
Version 1.0
Prepared By / Last
Reviewed By Approved By
Updated By
Ramadevanahalli
Name Ramamoorthy Selvam Vimalathithan Krishnan Lingachar, Shashidhara
Murthy
Learning Solution Learning Solution
Role Learning Solution Lead
Designer Architect
Signature
Date
1.0 Introduction 3
1.1 Purpose of this document 3
1.2 Definitions & Acronyms 3
1.3 Project Overview 3
1.4 Scope 3
1.5 Intended Audience 3
1.6 Hardware and Software Requirement 3
1.4 Scope
1. Creation of DAO classes and methods for reading and persisting data of truYum
application.
Scrum Master
Application Architect
Project Manager
Test Manager
Development Team
Testing Team
2. Software Requirement
ADO.Net class library needs to be referenced in the Class Library project created in the
Console application as per the CSharp specification. The data fetched from database thru
ADO.Net should be displayed in the console window of the TruyumConsole application.
Highlighted classes are the ones that needs to be implemented in this specification.
The connection details has to be stored in a web.config file. Find the details below:
<connectionStrings>
<add name="connectionString"
connectionString="Data Source=localhost;Initial Catalog=truYum;
Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
A static class with a property ConnectionString that gets connection string from the
web.config file.
3.
3.1 MenuItemDaoSql.cs
GetMenuItemListAdmin() of return type List<MenuItem>
3. Using SqlCommand execute the select query that retrieves all the records from
menu_item table
5. For each item in the ResultSet create a new MenuItem instance and add it to the
List created in the step 2 and return the List
4.1 MenuItemDaoSql.cs
GetMenuItemListCustomer() of return type List<MenuItem>
3. Using SqlCommand execute the select query that retrieves the records from
menu_item table applying the following filters:
5. For each item in the ResultSet create a new MenuItem instance and add it to the
List created in the step 2 and return the List
5.1 MenuItemDaoSql.cs
GetMenuItem(long menuItemId) of return type MenuItem
2. Execute select query using SqlCommand that retrieves an item from menuItem table
based on menuItemId.
3. Create a MenuItem instance and set the values for this menuItem instance from the
first item of the ResultSet
EditMenuItem(MenuItem menuItem)
2. Execute update statement using SqlCommand that modifies the values of menuItem
table based on menuItemId.
6.1 CartDaoSql.cs
AddMenuItem(long userId, long menuItemId) of return type void
2. Execute insert statement using SqlCommand for inserting data into cart table with
userId and menuItemId.
7.1 CartDaoSql.cs
GetMenuItems(long userId) of return type List<MenuItem>
3. Execute update statement using SqlCommand that joins Cart and MenuItem table to
retrieve the list of menu items associated with a specific user.
5. For each item in the ResultSet create a new MenuItem instance and add it to the
List created in the step 2 and return the List
8.1 CartDaoSql.cs
RemoveMenuItem(long userId, long menuItemId) of return type void
2. Execute delete statement using SqlCommand for delete data into cart table based on
userId and menuItemId.
9.1 DAO
1. All .Net coding standards are applicable
2. Closure of connection should be done within finally block or thru Using statement