Does Dapper work in medium trust? - dapper

Just getting started with Dapper. I'd like to use it, but I have to be sure that it will work in a medium-trust server situation. I've googled for answer without any luck.
Thanks.

SecurityException - Dapper on shared hosting
As per the link above, it doesn't look like this is possible.

Dapper actually does work but in a limited way. I've gotten the Get methods to work fine but the updating and inserting seems to be the major problem area so I just manually do those. Oh well. I like Dapper too much to drop it completely.

Related

Microsft SQLHelper vs Dapper

I am new to C#, programming for less than a year. Until now I have been using the Micrsoft SQLHelper class. (copy of text header below) I recently came across Dapper.
Question is, should I switch to using Dapper ?
Although the SQLHelper class has worked with no issues, I don't know how old it is and I don't have enough experience to determine whether I should switch to using Dapper for xyz reasons. Is Dapper the preferred long term solution?
Thanks
// Microsoft Data Access Application Block for .NET // SQLHelper.cs //
// This file contains the implementations of the SqlHelper and
SqlHelperParameterCache // classes.
Is EntLib doing what you need and not inconveniencing you? Then: perhaps stay with it. Dapper would probably be more convenient in a lot of ways, and EntLib is arguably taking a complex API (ADO.NET) and making it more complex (as opposed to Dapper which aims to make things simpler for the caller), but: if the code works... shrug.
If you were starting from scratch, I'd 100% say "don't go near EntLib with a barge pole, Dapper is fine" (disclosure: I'm a little biased), but: if your code is working today, probably best not to touch it unless you have time to fix any problems you get while moving cogs.

How to run code in wordpress to handle database

Whenever I have to run code on the database, change posts, or terms or what have you, I am running it on a custom page template.
Since this has been working for me up to know, I didn’t think about it much. But I need to delete a ton of terms now from a custom taxonomy and I can’t do it on the test page very effectively. Meaning I get 504 gateway errors all the time, because the code takes too long to run, and deletes only a part of the terms.
So I am wondering, if I need to run custom code to change a lot of data, what is the most efficient method to use?
Many people use a plugin named Code Snippets for this. Otherwise it's often more efficient to use direct SQL Queries using phpMyAdmin for example.

Work with Database using Spock and Geb.

I hope someone have already faced an issue to verify that application shows correct data from database. I reviewd how groovy used SQL, but I have no idea where and how I should do that. I'm just starting to use gradle+Spock+Geb for testing application. I have a few files where I described a couple of pages from application, a couple of modules and a file with spock specification. Where and how I need to connect to Oracle DB, use SQL and compare result's data with application's ones?
P.S. I write everything in notepad++ and launch from command line writing 'gradlew firefoxTest'. Does exist any more comfortable way to work with gradle+spock+geb?
Thanks in advance.
Because there are no other answers, I wanted to provide a solution someone at my company thought of. This assumes you already have a project that uses some sort of JDBC. In our case it is JDBI.
The idea is to extend Classloader and then use that to directly access the data access object class via the JVM. That idea should work.
I have not tested it out because it doesn't completely fit our use-case. I'll admit that this does not completely apply to your use case, but technically you could just run the jar of an existing project, which can access the database.

Hibernate Reverse Engineer Database

I am using MyEclipse to generate Hibernate code for a PostgreSQL database. The issue is that this is the only reason I'm using MyEclipse. I would like to use some kind of command line tool to easily generate this code. I've seen some mention of such tools but I can't find anything solid. It seems like what I want to do is pretty simple. I hate to fire up this IDE and go through all this stuff just to do some simple code gen.
What's the best way to do this simply?
Yes, you can do it using ant from command line like this.

CustomServiceHostFactory and Generating proxies in silverlight

Hi I'm using and Custom ServiceHostFactory, and when I want to update service reference it would'nt work because I assume it needs to setup my servicehostfactory and it will crash.
I have looked for other approaches to not use the generation, but I havent found any good replacements.
Are there anyway to go around this, to not remove the servicehostfactory from the svc files everytime and then put them back there after service reference updates :S.
We use the non generation method described in this dnrtv screencast.
It has worked very well for us. Prevoiously we wasted alot of time due to references not updating or developers forgetting to update a reference before they checked in code.
I rechecked the namespace path and it were wrong in the svc file.

Resources