Questions tagged [insight.database]

Insight.Database lets you call your database with almost no code, and makes it easy to send objects to your database and get them back. It's available under MS Public License.

Links

Wiki

Github

26 questions
4
votes
2 answers

Insight.Database column mapping to object

I'm using Insight.Database as our micro-ORM. I wanted to figure out if there is a way to take the following POCO class associations and map results from a single row into these objects. public class Rule { public int Id { get; set; } public…
David Pine
  • 23,787
  • 10
  • 79
  • 107
3
votes
1 answer

Does Insight.Database inherit [Schema] annotations?

So I thought I'd try something a bit clever/stupid in my datalayer. I'm using Jon Wagner's Insight.Database but most of my tables have a set of CRUD operations. So I figured, why not do this : public interface IDataInterface { Task
Rich Bryant
  • 865
  • 10
  • 27
3
votes
1 answer

Insight.Database - using Insert with OpenWithTransaction

First question ever :) I'm a newbie at using the Insight.Database library but I think I'm using this in the right way. I'm running the (simplified) code below from a XUnit Test in another project in the same solution. The exception is thrown on the…
tumblebug999
  • 121
  • 5
2
votes
1 answer

Support for great-grandchildren (Insight.Database)

Using Insight.Database, I can query for an object with children and its grandchildren: var someObject = connection.Query("SomeStoredProc", new {ParentId = id}, Query.Returns(Some.Records) …
kcbhai
  • 95
  • 1
  • 6
2
votes
1 answer

What's the right/best way to handle nullable parameters in Insight.Database?

I've been using Insight.Database for about a year to invoke stored procedures, but I've only just run into a situation where the stored procedure has a defaultable nullable parameter that Insight doesn't handle as I was expecting. Briefly, the…
Joshua Frank
  • 13,120
  • 11
  • 46
  • 95
1
vote
1 answer

Insight.Database [BindChildren] on subclass not working

I am using insight.database with my c# project. I Have a class that has a subclass. I am using an inner join in my SP to flatten and get my fields. However, I want some of the query result fields to map to my subclass. It's not working as I…
KidFischer
  • 11
  • 3
1
vote
1 answer

Insight.database and Oracle stored procedure with output parameters

I have a problem when I called Oracle stored procedure. I also used InsightDbConnection with method Execute, when I input the outputParameter is an object but it still empty. Here is my code var storedProcedureName = "spTest"; object param = new {…
tahter
  • 31
  • 1
  • 5
1
vote
0 answers

Operation could destabilize runtime Insight.Database

I am using Insight.Database in asp.net webforms project developed in vs 2010. This error occurs in windows shared hosting hosted in hostgator.com and the .net framework version is 4. The class which throws error works good in local System. The…
sansknwoledge
  • 4,209
  • 9
  • 38
  • 61
0
votes
1 answer

DI broken in .NET6?

I'm doing something completely normal - registering Insight.Database autointerfaces in WebApi DI. Here's the code - var dataString = builder.Configuration.GetConnectionString("DefaultConnection"); SqlInsightDbProvider.RegisterProvider(); var…
Rich Bryant
  • 865
  • 10
  • 27
0
votes
1 answer

Getting error 'Insight.Database.FastExpando' does not contain a definition for 'Set1'

The following code is giving the above error, and I cannot figure out why: var x = _sqlConn.Connection().QueryResults("MyDb.dbo.get_records", new { id = theId }); int retVal = x.Outputs.Return_Value; if (retVal == 0) // ...meaning result…
0
votes
2 answers

How do I specify the User-Defined Table Type for a property with Insight Database

I have a pretty simple stored procedure to just update the status value for a bunch of records. I send in an unknown value of record IDs and it works. I love using Insight.Database and wouldn't want to use anything else if possible. The problem is…
Brandon Meyer
  • 349
  • 2
  • 14
0
votes
1 answer

Parameter injection with Prism 7 and Unity

I'm using Insight.Database by Jon Wagner as my micro-ORM, meaning there are no concrete implementations for my (database) interfaces. I'm trying to inject one of those interfaces into my Prism 7 MainWindowViewModel, simply to see if the database…
Rich Bryant
  • 865
  • 10
  • 27
0
votes
1 answer

Inisght.Database Auto Repository and Custom Column Mapping

I am trying to implement Insight.Database in a project, and have run into a brick wall trying to utilize the automatic interface implementation AND mapping object properties to odd column names in the database. I have the following…
Scott Harris
  • 73
  • 1
  • 7
0
votes
1 answer

Can Insight.Database stream data from an interface?

A simple yes or no, I suppose. Let's say I'm using dependency injection to make use of Insight.Database's auto interfaces as a repository. Let's also say that some of those tables are way too big to want in memory. Given that I have injected…
Rich Bryant
  • 865
  • 10
  • 27
0
votes
0 answers

Insight.database and stored procedure output parameters

My question deals with getting output parameter values back from a SQL Server stored procedure call with Insight.Database. If I declare a class, and then pass in an instance of that class, output parameters come back as advertised. But this has…
1
2