Questions tagged [simple.data]

Simple.Data is a lightweight framework that uses the dynamic features of .NET 4 to provide an expressive, ORM-ish way of accessing and manipulating data without any of the code pre-generation and boilerplate required by other frameworks.

Simple.Data is a lightweight framework that uses the dynamic features of .NET 4 to provide an expressive, ORM-ish way of accessing and manipulating data without any of the code pre-generation and boilerplate required by other frameworks. Instead, it interprets method and property names at runtime and maps them to your underlying data-store using a convention-based approach.

128 questions
3
votes
2 answers

Extending Simple.Data with assertions

I'm using this very nice mini ORM, Simple.Data, to setup a lot of test data, quick and easy. I would really like to extend it for assertions. For example i would like to assert on count: Db.MyTable.GetCount(); <- Returns a dynamic So that I could…
Christian Mikkelsen
  • 1,661
  • 2
  • 19
  • 44
3
votes
2 answers

Simple.Data Micro ORM with Intellisense in Visual Studio (dynamics)

I've decided to use Simple.Data Micro ORM for it's simplicity to work with database and save me writing quite a lot of code and Id don't even need to create the object due to dynamics! The thing is that I lose Intellisense support in Visual Studio,…
Liron Harel
  • 10,819
  • 26
  • 118
  • 217
3
votes
1 answer

How can I cast to IEnumerable in simple.data?

I have this query in simple.data var db = Database.Open(); IEnumerable recetas = db.Factura .All() .Where(db.Factura.ObraSocialPlan_id == obraSocialPlanId) .Select(db.Factura.Id) .Cast(); And I'm getting Cannot…
Rodrigo Juarez
  • 1,745
  • 1
  • 23
  • 38
2
votes
1 answer

Mapping object hierarchies with Simple.Data

Has anyone figured out the best way to return an object hierarchy with a multiple record set stored procedure? At the moment I am pulling out each of the record sets and mapping them individually into their types and then constructing the main…
martin308
  • 706
  • 6
  • 20
2
votes
3 answers

Enumerating return list from simple.data

I am attempting to process results from a select (Find.., All, etc) from simple.data, but I am getting errors: var db = Database.Open(); var codes = db.Code.All(); // 'object' does not contain a definition for 'First' var firstcode =…
Sprintstar
  • 7,938
  • 5
  • 38
  • 51
2
votes
0 answers

Wrong FirstOrDefault on SimpleDataCollection with MongoDB adapter

I have MongoDB collection /* 0 */ { "_id" : ObjectId("55eafc733d845f2b0cf05944"), "TypeOfStudies" : "ZAO", "PublishDateUtc" : ISODate("2015-08-26T22:00:00.000Z"), } /* 1 */ { "_id" : ObjectId("5601977f3d845f09c0051225"), …
pizycki
  • 1,249
  • 4
  • 14
  • 26
2
votes
0 answers

Simple.Data > Object inside another object not populated

I have 2 tables as below: Table: Orders CREATE TABLE [dbo].[orders]( [id] [int] IDENTITY(1,1) NOT NULL, [ticker] [char](5) NOT NULL, [broker_id] [char](12) NOT NULL, [type] [smallint] NOT NULL, [quantity] [int] NOT NULL, …
Kevin
  • 63
  • 6
2
votes
0 answers

Simple.Data and Oracle Managed Provider cannot open connection

I am trying to use Simple.Data with Oracle Managed Provider using nuget package from https://github.com/SimonH/Simple.Data.Oracle. I have following code: var db = Database.OpenNamedConnection("ManagedOdpOracle"); db.Open(); The entry in app.config…
WaldiMen
  • 347
  • 2
  • 12
2
votes
2 answers

How to create table with Simple.Data?

I'm making my first steps with Simple.Data ORM. I wanted to know if there is anyway I can create new table in my database. Currently I'm working on MemoryAdapter (provided with library) but in future, I want to do the same with production…
pizycki
  • 1,249
  • 4
  • 14
  • 26
2
votes
3 answers

Casting Simple.Data.Query to POCO Object

I have the following query to read record from database using Join statement in Simple.Data.SqlServer. var productLineItem = (ProductLineItem) (database.Products.All() .Select( …
Afraz Ali
  • 2,672
  • 2
  • 27
  • 47
2
votes
0 answers

Simple.data and nested projection logic

I have table HOSPITALS and ADDRESSES Where ADDRESS_ID is the foreign key . I am using simple.data to get all the details for the class Hospitals which has a Addresses object in it. I am having a query which is…
satish
  • 2,425
  • 3
  • 23
  • 40
2
votes
0 answers

Simple.Data LIKE Operator in Where

How can we use LIKE operator in WHEREusing Simple.Data for SQL Server in ASP.Net C# I need to run this SQL Query SELECT MAX(regid) FROM reg_course WHERE(regid LIKE '%2013%') Finally I achieved this task by aliasing the max(regid) column and …
rohit gupta
  • 45
  • 1
  • 10
2
votes
1 answer

Simple.data select top N records

I'm using Simple.Data to select data from a table and am wondering if there is a way to select the top 10 records from the table. Something like: var result = _database.UserList.All() .Select(_database.UserList.Name).Take(10) -- or…
Dave
  • 3,812
  • 5
  • 31
  • 39
2
votes
1 answer

Is there a way to log the actually executed SQL query from Simple.Data?

I'm looking for a feature much like the Log property in Linq DataContext.
fredzvt
  • 331
  • 2
  • 8
2
votes
1 answer

Retreive data with simple.data from a table with its name passed in as a variable?

Is it possible to query a table with simple.data that has its table name passed in from somewhere else. for example: string tableToUse = "MyTable"; var test = db.tableToUse.All();
Dave
  • 3,812
  • 5
  • 31
  • 39
1
2
3
8 9