Questions tagged [data-access]

Data access typically refers to software and activities related to storing, retrieving, or acting on data housed in a database or other repository.

Data Access is simply the authorization you have to access different data files. Data access can help distinguish the abilities of Administrators and users. E.g. Admins may be able to remove, edit and add data, while a general user may not be able as they don’t have the access to that particular file.

327 questions
13
votes
4 answers

WCF DataContracts and underlying data structures

I am wondering what makes sense in relation to what objects to expose through a WCF service - should I add WCF Serialization specifications to my business entities or should I implement a converter that maps my business entities to the DataContracts…
Xerx
  • 3,755
  • 8
  • 32
  • 28
11
votes
7 answers

LINQ To SQL entity objects as domain objects

Clearly separation of concerns is a desirable trait in our code and the first obvious step most people take is to separate data access from presentation. In my situation, LINQ To SQL is being used within data access objects for the data access. My…
Martin
11
votes
7 answers

Good practice to create extension methods that apply to System.Object?

I'm wondering whether I should create extension methods that apply on the object level or whether they should be located at a lower point in the class hierarchy. What I mean is something along the lines of: public static string SafeToString(this…
Christian
  • 4,261
  • 22
  • 24
10
votes
6 answers

data access in DDD?

After reading Evan's and Nilsson's books I am still not sure how to manage Data access in a domain driven project. Should the CRUD methods be part of the repositories, i.e. OrderRepository.GetOrdersByCustomer(customer) or should they be part of the…
Manu
  • 28,753
  • 28
  • 75
  • 83
10
votes
2 answers

where to handle spring DataAccessException

I develop an application using Struts, Spring, and Hibernate. My DAOs uses spring jdbc and all its method throws DataAccessException(that is uncheked). Where should I handle this exceptions? I know it's an unchecked exception but I think I need to…
rohit
  • 602
  • 4
  • 11
  • 24
9
votes
7 answers

What are best practices to implement security when using NHibernate?

Traditionalist argue that stored procedures provide better security than if you use a Object Relational Mapping (ORM) framework such as NHibernate. To counter that argument what are some approaches that can be used with NHibernate to ensure that…
Ray
  • 187,153
  • 97
  • 222
  • 204
8
votes
2 answers

Nhibernate: Who is responsible of transaction management in a non web application

Well in a web application a unit of work is responsible for the transaction management. But what about a windows application? As far as I know the repository is the connector between my data access layer and my business layer. It hides all the data…
Rookian
  • 19,841
  • 28
  • 110
  • 180
7
votes
2 answers

The type Database cannot be constructed. You must configure the container to supply this value (EntLib 5 + ODP.NET)

I use ODP.NET and version 4.1 of the Enterprise Library, vs 2008. And all is OK. Now, migrate using ODP.NET Oracle.DataAccess 4.112.2.0 and version 5.0.414.0 of the Enterprise Library, vs 2010, .net 4.0. Oracle.DataAccess 4.112.2.0 EnterpriseLibrary…
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
7
votes
6 answers

Is LinqToSQL the same as Linq?

I was just reading about Linq to SQL being discontinued. For a while I put off learning Linq at all. Even on asp.net, when I last checked, their data access tutorials were using table adapters and bll classes. Then there are linq tutorials. Now…
johnny
  • 19,272
  • 52
  • 157
  • 259
7
votes
8 answers

C# static database class?

I have a Database class which contanins the follwing methods: public bool ExecuteUDIQuery(string query) // UDI = Update Delete Insert public bool ExecuteSelectQuery(string query) public bool ExecuteSP(string sp, string[,] parms) public int…
Martijn
  • 24,441
  • 60
  • 174
  • 261
6
votes
3 answers

marking BLL classes as static or?

I already have a layered data access design which works well. But i dont know if it is the most suitable implementation or not. i simply want to know that BLL classes or methots should be static or they should be concreate classes which has only one…
Fer
  • 1,962
  • 7
  • 29
  • 58
6
votes
2 answers

Referencing schema names for tables in the Entity Framework

How do you explicitally tell EF that a table lies in a specific schema? For example, the AdventureWorks database defines the Production.Product table. When using the OnModelCreating method, I use the following code: protected override void…
Dominic Zukiewicz
  • 8,258
  • 8
  • 43
  • 61
6
votes
4 answers

How to Convert Datareader Result of DbType.Time to Timespan Object?

I am reading a result from a MS SQL 2008 Database with a column type of dbtype.time from a datareader, using c# with DAAB 4.0 framework. My problem is the MSDN docs say dbtype.time should map to a timespan but the only close constructor for timespan…
Element
  • 3,981
  • 7
  • 42
  • 51
6
votes
3 answers

How to limit user access at database level in Hibernate

The App I need to implement a web app that will be used by different users. Each user has different privileges on various tables, e.g. User A can see fields 'name' and 'address' from the table Student User B can see fields 'name' and 'phone…
tomato
  • 5,644
  • 13
  • 43
  • 48
6
votes
8 answers

Should I Learn "Raw" ADO.Net Before Learning Linq or Entity Framework?

When I first started learning how to do Classic ASP, VBscript, and HTML someone told me to go out and purchase Dreamweaver because "it would make life easy" so I did that and it got me my first profesional job. The issue was when the HTML, VBScript,…
user568171
1
2
3
21 22