Questions tagged [data-access]
11 questions
16
votes
3 answers
Does caching belong in a repository class?
I have gone back and forth on this issue several times.
On one hand, you could argue, a repository's single responsibility is to manage the persistent state of an entity, and the consuming application is the one that knows whether it will accept a…

TheCatWhisperer
- 5,231
- 1
- 22
- 41
2
votes
2 answers
Can a UWP App access data outside its own app data, publisher data, or what the user picks with the FilePicker?
Can a UWP App access data outside its own app data, publisher data, or what the user picks with the FilePicker?
As far as I can tell, a shared publisher area and a user prompt with the FilePicker are the only ways to access files outside a UWP app's…

kayleeFrye_onDeck
- 219
- 1
- 14
1
vote
1 answer
How can I design a data access layer that connects to two different databases?
I have a C# application that needs to connect to either an Oracle database or a SQLite database. The databases can be considered "identical" - same schema - but users have the ability to "load" their own SQLite file for faster local access. I'm…

Adam
- 113
- 4
1
vote
1 answer
Is it good practice to use data API for access cross platform
All,
Question: Should I have a common data access API between various cross platform applications or keep the data access specific to the UI even though it would result in duplication?
Background: I’ve been developing various applications many with…

0perator
- 113
- 2
1
vote
1 answer
Is my DataAccessLayer well implemented?
I have 3 projects in my solution :
An ASP MVC project
A console app project
A class library project (the DataAccessLayer)
I didn't want to recreate an ADO.net entity data model for each project so I've "simply" created a new class library project…

flofreelance
- 143
- 4
0
votes
1 answer
What is an apporpriate design pattern when dealing with Pandas and databases?
We're dealing with a lot of "data analysis", basically different sorts of data mangling, aggregations and calculations using Pandas. Usually, the data is time series data.
All underlying data is stored in a SQL database.
As of now, we usually wrap…

highviolet
- 3
- 2
0
votes
0 answers
Models as data containers in MVVM
In the past, when I've used MVC, my model objects were just dumb data containers. Everywhere I read says that in MVVM, models should contain business logic as well as being a data container. Now that my model objects also contain business logic, how…

Alex F.
- 1
0
votes
1 answer
When dealing with session level data in a web app, is it better to maintain a static store of that data, or pass it around as needed?
I have a web app that is capable of connecting to multiple databases that are identical in structure but contain different data; each of our clients who uses the app gets their own copy of the database to avoid commingling of different clients'…

ekolis
- 491
- 1
- 4
- 7
0
votes
1 answer
Where does code belong when it is called by multiple sources?
I am working on a process that requires two different portions of it to make use of an ORM (I am using Insight.Database for this), and I am not sure where this portion of the code belongs, as I am not currently creating an abstraction layer over it…

Wayne Molina
- 15,644
- 10
- 56
- 87
-2
votes
2 answers
Creating new methods for every read query in Data Acess Layer
Lets say we have a table 'A' with 4 referenced tables : Table B,C,D,E
In our Data Acces Layer we could write a method that returns Table A containg every entity of B,C,D,E by joining in order to reuse that method in bussnies layer.
Is the better…

Michael
- 1
- 1
-4
votes
1 answer
Express SQL Query As Abstract Object Model
Goal: write code to express SQL queries in C# that get converted to SQL at the data layer level and will be compatible with any common data layer / ORM such as Dapper or Entity Framework (EF).
Edit:
And, ability to dynamically build queries at…

Christian Findlay
- 279
- 1
- 10