data-access-layer

Using XML field Vs. creating a table for unstable organization

半世苍凉 提交于 2019-12-02 07:11:10
I am in the middle of design an application to issue and store invoices for an organization. The problem is the organization is not stable at all. There are many types of invoices and they may increase and change. First, I tried to use tables in my DAL, one table to store invoices, one for invoice fields, and one for invoice field values. The problem was, this way needs Reflection to detect fields later, and this may slow the application when invoice contains plenty items. Second, I tried to keep core of invoice data as two tables: invoices and invoice items. Other fields are fully catchable

Using XML field Vs. creating a table for unstable organization

淺唱寂寞╮ 提交于 2019-12-02 06:52:18
问题 I am in the middle of design an application to issue and store invoices for an organization. The problem is the organization is not stable at all. There are many types of invoices and they may increase and change. First, I tried to use tables in my DAL, one table to store invoices, one for invoice fields, and one for invoice field values. The problem was, this way needs Reflection to detect fields later, and this may slow the application when invoice contains plenty items. Second, I tried to

How to implement a data access layer within MVC Controller

岁酱吖の 提交于 2019-12-02 06:28:45
问题 I understand that data access layer's or simply DAL's are used to access and retrieve information from a database, but i'm not sure how to call the DAL data within the controller. For instance i made this static class within my DAL but i'm not sure as to how to call it to my controller, any help or guideline would be appreciated. DohvatiMetodu is the name of the class. public static FormInputViewModel DohvatiMetodu() { var viewModel = new FormInputViewModel(); var metoda = new List<Metoda>();

Types the DAL and BLL should pass

瘦欲@ 提交于 2019-12-02 05:06:22
问题 Just a quick question. In a tiered architecture environment with a Business Logic Layer (BLL) and a Data Access Layer (DAL), what types should the DAL pass to the BLL? Currently our DAL classes produce DataTables and SQlDataReader objects (among others common data types). Should the conversion of the objects to our custom types be done in the DAL before passing to the BLL or should the DAL pass the original type and the BLL does the conversion? I'm trying to think of a scenario where the DAL

Designing DAL and BLL - Single/Multiple Data Repository for the Related Tables

感情迁移 提交于 2019-12-02 04:50:55
问题 While designing a new multi-tier application, I am facing difficulty making a decision for my DAL and BLL layer design. Suppose I have Employee information spread in multiple tables having both 1-1 and 1-Many relationship with master table. Few are listed below: Employee (Master Table), Employee_Contact_Detail, Employee_Education, Employee_Skill, Employee_Experience At DAL level, I have a generic data repository providing common functionality like GetAll, GetSingle, Add, Edit, Delete for each

Should raw Hibernate annotated POJO's be returned from the Data Access Layer, or Interfaces instead?

旧时模样 提交于 2019-12-02 04:06:52
问题 I understand separating the data layer objects (DAOs) in their own layer that abstracts the data access logic and data source specifics from service and business layers as outlined in DAO and Service layers (JPA/Hibernate + Spring) and other questions. I have experience creating these layers, but I've always used either raw JDBC or similar lower level ways of interfacing with the DB (such as Spring's SimpleJDBC), and am new to Hibernate. My question comes in that in raw JDBC or other ways

ASP.net DAL DatasSet and Table Adapter not in namespace - Northwind Tutorial

别等时光非礼了梦想. 提交于 2019-12-02 03:39:21
I've been attempting to walk through the "Creating a Data Access Layer" tutorial found http://www.asp.net/learn/data-access/tutorial-01-cs.aspx I create the DB connection, create the typed dataset and table adapter, specify the sql, etc. When I add the code to the presentation layer (in this case a page called AllProducts.aspx) I am unable to find the NorthwindTableAdapters.ProductsTableAdapter class. I tried to import the NorthwindTableAdapters namespace, but it is not showing up. Looking in the solution explorer Class View confirms that there is a Northwind class, but not the namespace I'm

Should raw Hibernate annotated POJO's be returned from the Data Access Layer, or Interfaces instead?

柔情痞子 提交于 2019-12-02 01:27:22
I understand separating the data layer objects (DAOs) in their own layer that abstracts the data access logic and data source specifics from service and business layers as outlined in DAO and Service layers (JPA/Hibernate + Spring) and other questions. I have experience creating these layers, but I've always used either raw JDBC or similar lower level ways of interfacing with the DB (such as Spring's SimpleJDBC), and am new to Hibernate. My question comes in that in raw JDBC or other ways where you are actually dealing with a result set (or a thin wrapper around it) at the data access layer,

How to implement a data access layer within MVC Controller

时光毁灭记忆、已成空白 提交于 2019-12-01 23:43:57
I understand that data access layer's or simply DAL's are used to access and retrieve information from a database, but i'm not sure how to call the DAL data within the controller. For instance i made this static class within my DAL but i'm not sure as to how to call it to my controller, any help or guideline would be appreciated. DohvatiMetodu is the name of the class. public static FormInputViewModel DohvatiMetodu() { var viewModel = new FormInputViewModel(); var metoda = new List<Metoda>(); var metodaList = new List<SelectListItem>(); using (var db = new ApplicationDbContext()) { metoda = db

Designing DAL and BLL - Single/Multiple Data Repository for the Related Tables

馋奶兔 提交于 2019-12-01 22:50:55
While designing a new multi-tier application, I am facing difficulty making a decision for my DAL and BLL layer design. Suppose I have Employee information spread in multiple tables having both 1-1 and 1-Many relationship with master table. Few are listed below: Employee (Master Table), Employee_Contact_Detail, Employee_Education, Employee_Skill, Employee_Experience At DAL level, I have a generic data repository providing common functionality like GetAll, GetSingle, Add, Edit, Delete for each table. Now, should I design my “Employee Data Repository” derived from my “Generic Data Repository”