Questions tagged [data-layer]

A data access layer (DAL) in computer software, is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database.

A data access layer (DAL) in computer software, is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database.

58 questions
0
votes
1 answer

passed dbcontext connection string to DALayer

I have 4 layer in my application UI,DomainClass,Model(DBCntext),Repository. In repository i have an abstract class like this : public abstract class GenericRepository : IGenericRepository where T : class where C :…
Ehsan Akbar
  • 6,977
  • 19
  • 96
  • 180
0
votes
2 answers

An entity object cannot be referenced by multiple instances of IEntityChangeTracker in EF data access layer

I have seen plenty of questions regarding the same topic, but never found solution as yet. The code that is bringing me problems is: public async Task Post(FullOrderViewModel fullOrder) { //Get all order items …
Bartosz
  • 4,542
  • 11
  • 43
  • 69
0
votes
1 answer

Google Tag Manager Data Layer macro not passing value to a custom Tag

I have setup a Data Layer Variable type macro named orderTotal which is linked to a variable I am pushing through on the checkout page. In my custom HTML tag I am doing following: var order_tot = {{orderTotal}}; But the issue is that when I test…
failsafe
  • 15
  • 6
0
votes
2 answers

how to show data in labels in c#

I have two layers, a data layer which gets the results from the database and a UI layer which will show the data in label controls Here is the code of data layer public class Test_DAL { public DataSet getEMP(string name1) { string…
user3145763
  • 1
  • 1
  • 1
0
votes
2 answers

What are the responsibilities of the data layer?

I'm working on a project where I had to add a data layer to my application. I've always thought that the data layer is purely responsible for CRUD functions ie. shouldn't really contain any logic but should simply retrieve data for the business…
alimac83
  • 2,346
  • 6
  • 34
  • 50
0
votes
0 answers

Putting logic in entity class which extends datalayer entity

I have a question regarding Layered architecture. We are drafting a layered architecture and we have decided to have a data layer, Business layer and the front with viewmodels. My question is regarding the Business layer and where to put the…
Arin
  • 632
  • 6
  • 16
0
votes
1 answer

Properly Refactoring to avoid a Circular Dependency

I am having a problem with a circular dependency. Similar question have been asked and I have read a lot of answers. Most deal with a work-around but I would like to refactor so what I have it correct and I would like some input on where I have…
0
votes
2 answers

DbContext per HTTP Request But Avoid Dependency on HttpContext in Data Layer

I've been thinking of how I could use one instance of a DbContext per HttpRequest in a layered application. One of the solutions I came up with would be to create an HttpModule that would initialize an instance of the context in…
Kassem
  • 8,116
  • 17
  • 75
  • 116
0
votes
1 answer

ExecuteNonQuery Connection Error for Data Layer

Currently having an issue with this test windows form application. The constructor works to add data to a datagridview. However, when I click the button, it fails to add anything to run the sql command with the error ExecuteNonQuery: Connection…
Badmiral
  • 1,549
  • 3
  • 35
  • 74
0
votes
3 answers

General Query Method

I find that my C# apps do a lot of queries with a lot of boilerplate that clutters up my code space. I also want to avoid repetition, but I'm not sure how I could write a method to do this generically. I am accessing an Oracle database using ODP. I…
micahhoover
  • 2,101
  • 8
  • 33
  • 53
-1
votes
1 answer

Which data model should i use

I want to develop web application which will be keeping results of game of teams within last 100 years and add actual results. My problem is that i don't know which data relation model should i choose relational or NoSQL. I have many years of…
WinnerIT
  • 125
  • 8
-1
votes
3 answers

Google Tag Manager Data Layer implementation and Magento Shop

I'm trying to connect Magento with Google Tag Manager, especially in order to track transactions and other e-commerce data in Google Analytics. I installed this GTM Magento extension which is useful to add the GTM snippet at the right place and the…
-1
votes
2 answers

'Payment.GenLedDet' is inaccessible due to its protection level

namespace DataAccessLayer { public class PaymentDAL { public void InsertInGenLedDet(GenLedDet genLedDet) { } } My Class GenLedDet is present inside Payment namespace This is my code snippet in the Data Layer and this…
vini
  • 4,657
  • 24
  • 82
  • 170
1 2 3
4