Menu
  • HOME
  • TAGS

ImportError: cannot import name secure_dumps

web2py,data-access-layer,bottle

The solution to this problem was to use gluino instead of gluon. gluino is a port of web2py to Bottle and other web frameworks and can be downloaded here.

Is A Mocking Library Redundant If I Already Have a Stub?

java,unit-testing,mocking,data-access-layer

My answers to your specific questions: Would it be redundant to also use a mock in the above unit test? As the unit test is written right now it would be redundant but my see answer to your second question below. What would be the value (if any) in additionally...

What's the recommended way to load an object graph from Data Access Layer?

c#,architecture,domain-driven-design,data-access-layer,software-design

What the author (Dino Esposito) is missing in his book is the clear separation of concerns that CQRS brings. If I'm not mistaking, this pattern is completely missing from his book. In Esposito's latest MSDN article, he explains CQRS, so I think he just wasn't that experienced at the time...

How to create Data access layer

c#,asp.net,database,wcf,data-access-layer

You're right that you want it in a different DLL which you can reference from both projects. The easiest way to do this is by creating a new project of type Class Library

WPF Architecture with Business Layer and DAL

c#,wpf,entity-framework,architecture,data-access-layer

Though I am quite not sure of your application scale but it seems good to me that you have started on a right path for separation of concerns. But you may need to rethink if creating separate project for each category of views does not introduce unnecessary complexity. Again I...

Is it possible to display the table records with dynamic columns using mvc3

asp.net,asp.net-mvc-3,c#-4.0,dynamic-programming,data-access-layer

First, I think it might be easier if you would use an ORM like Entity Framework, instead of ADO.NET. For the frontend I would recommend Grid.MVC. Here's an simple example to get you started http://www.codeproject.com/Tips/597253/Using-the-Grid-MVC-in-ASP-NET-MVC For the frontend you could use an if in the cshtml file such as: @{...

Converting Difference between two DateTimes in to HH:MM:SS format in asp.net C# Databinding Class

c#,asp.net,date,datetime,data-access-layer

Subtracting two DateTimes returns a TimeSpan which can be easily formatted: TimeTook = ( reader.GetDateTimeNullable("COMPLETED_DATE") - reader.GetDateTime("REQUEST_DATE") ).ToString(@"hh\:mm\:ss"); ...

Review of Connection handling and Data access layer using C#, sql server compact 3.5

ado.net,sql-server-ce,connection-pooling,data-access-layer

Too much code in your data access class, makes it unreadable and hard to maintain The SqlCeonnection object will be disposed when you close it (and when the app closes) You cannot dispose the DataTable if you want to use it elsewhere, and it is an completely managed object anyway....

How to organize DAL in ASP.NET MVC [closed]

c#,asp.net-mvc,data-access-layer

Here is my take: Should I create instances of repository for every entity in database or for all or one genereal instance, for example PostRepository can include entities like Post, Comment and Tag? Having one single generic repository will save you a lot of maintenance headache. You could implement single...

Creating Data Access Layer methods for Domain Models with extra data

asp.net-mvc,generics,architecture,data-access-layer

In EF exists the method Include which let you to preload records from related tables. public ActionResult Index() { var model = context.Posts.Include("Users"); return View(model); } In .cshtml: @model IEnumerable<Post> @foreach(var post in Model) { <p>@post.Description</p> @Html.Raw(post.Content) <p>By @post.Users.UserFullName</p> } See http://msdn.microsoft.com/en-us/data/jj574232.aspx for more details....

SettingsProvider class - should it be in DAL or BLL project?

c#,data-access-layer,bll

I don't agree that there is a right layer for you to put that class since you reading values from the config file based on keys provided and it can be needed by one or all of the layers. In the case of all layers using this class, you can...

Object reference not set to an instance of an object being thrown from DAL in seperate project

c#,linq,linq-to-sql,data-access-layer,n-tier

The NullReferenceException was thrown because the connection string was defined in the wrong config file. The generated code assumed that the connection string was available. That was a bad assumption, even if it was Microsoft making the bad assumption. Since Day 1, .NET configuration has always been in the config...

Must declare the scalar variable “@”

sql,data-access-layer,profiler

You probably want to change your SQL to use AND Something like DELETE FROM OCRDecibel WHERE [email protected] AND [email protected] AND [email protected] AND [email protected] Also, I think the call to cmd.Dispose(); as you are using a using block...

Wich process establishes the connection with the database server?

python,webserver,database-connection,data-access-layer,database-server

Yes, as Python application lives inside of the web server process, this process will establish the connection with database server.

Using Typed DataSets through a Business Logic Layer, access the fields returned

c#,data-access-layer

Even though the method is returning only one row, it's still likely to be a row set, so you need to identify the row you want to access (or iterate through the set). Something like: txtFirstName.Value = x[0].FirstName I believe x.FirstNameColumn will give you a reference to the column definition,...

How to return Linq query result from BLL layer to UI layer in C#

c#,asp.net,linq,data-access-layer,3-tier

You can return db.DBL_TBL which will return IQueriable. For example, public IQueriable<DB_TBL> GetTable() { dataContex db = new dataContex; return db.DB_TBL } You can also return IEnumerable or List as well. See example below which returns List. public List<DB_TBL> GetTable() { dataContex db = new dataContex; return db.DB_TBL.ToList(); } Then...

Implementing DAO for a single datasource

java,jdbc,data-access-layer

If it's just an example/student/test project I would say it is okay. The getConnection method can go into the DataSource class. And since you know you won't change the database, you won't be having problems. In a production environment it would be better, if you rename your DataSource to OracleDatasource...

Where to put insert,update, delete methods in asp.net mvc [closed]

asp.net-mvc,asp.net-mvc-4,data-access-layer,business-layer

You should put the Insert, update , delete etc methods in the Business layer and in Controller, just call the methods from Business layer. The data access should never interact directly with the Controller or the presentation layer. (These are the good programming ethics since they provide security to the...

Asynchronous Database Access Layer in PureMVC

sqlite,actionscript-3,model-view-controller,data-access-layer,puremvc

Typically in PureMVC you would use a Proxy to fetch remote data and populate the VOs used by your View, so in that respect your proposed architecture sounds fine. DAOs are not a pattern I've ever seen used in conjunction with PureMVC (which is not to say that nobody does...

Design Patterns for Data Access Layer

java,mongodb,design-patterns,dao,data-access-layer

Well, the common approach to data storage in java is, as you noted, not at all very object-oriented. This in and of itself is neither bad or good: "object-orientedness" is neither advantage nor disadvantage, it's just one of many paradigms, that sometimes helps with good architecture design (and sometimes does...

is declaring a Business Layer object as public property in a asp.net masterpage a good move? [closed]

c#,asp.net,performance,data-access-layer,business-layer

Putting it in the MasterPage seems like overkill. How about creating a class that inherits from Page and have all of your pages that need access to the data layer inherit from that class.

Why use DTOs insted of ORM generated entities [closed]

c#,entity-framework,data-access-layer,dto,service-layer

I think one reason, using dto classes does not directly bind the client to your database model, as it would if you were transferring ef classes. It allows you to make changes to your backend and in some cases keep these changes from effecting your clients. There are truly many...

How to add unit test To ADO.Net Generic Data Access Layer

sql-server,unit-testing,c#-4.0,ado.net,data-access-layer

Microsoft's Data Access Application Block is a generic ADO.Net DAL. It's source code is available on CodePlex along with Unit Tests. Even if you write your own, you can use it as a guide, or any other OpenSource micro-ORM. Most micro-ORM projects worth their salt come with Unit Tests.

Web2Py DAL - How to check list:string type items for None

python,web2py,data-access-layer

If you input records via SQLFORM, empty values for task will get stored as an empty list rather than None, so you can do: db(db.newItems.tasks != []).select(db.newItems.tasks) Note, that will also exclude records that happen to have None values for task (which might exist if you have inserted records without...