Questions tagged [petapoco]

PetaPoco is a tiny and fast micro-ORM for .NET and Mono.

PetaPoco is a tiny and fast single-file or library referenced micro-ORM for .NET and Mono. It prides itself on being an easy to use and no fuss. Support for all the common databases engines are included (SQL Server, SQL Server CE, MS Access, SQLite, MySQL, MariaDB, PostgreSQL, and Oracle databases).

Single file

PetaPoco is available as a single file nuget package, with or without T4 templates to generate POCOs from an existing database schema. In the single file form PetaPoco has zero dependencies.

Speed

PetaPoco benchmarks done by the author can be found here. (Note that there have been several performance improvements made in the code since these benchmarks.)

Frans Bouma's benchmarks can be found here


See the PetaPoco website for a full list of features.

429 questions
0
votes
1 answer

Is there any help to save data to database?

I am trying to save or insert data into my database where my table is Purchase. But it is not saving any data to my table, and also not showing any error. At first i don't know why Save button is not clicking. Here is my ajax method where i am…
Abdul Hamid
  • 121
  • 1
  • 1
  • 11
0
votes
2 answers

PetaPoco update just modified records in winforms

I have this code : namespace PetaPocoTest { public partial class Form1 : Form { PetaPoco.Database db = new PetaPoco.Database("PgConnection"); IEnumerable allCustomers; public Form1() { …
EmirZ
  • 646
  • 4
  • 10
  • 21
0
votes
1 answer

why my textbox doesnot return any proper value in jquery?

I have created this controller for for getting existing value by searching id. this is my controller for searching data by id. this code is running well but result is not acceptable. i am new in jquery that's why i am explaining this very…
MNAH
  • 71
  • 1
  • 10
0
votes
1 answer

how to update a primary key that is also a foreign key in another table with petapoco?

public class User { public int Id {get;set;} } public class Phone { public int Id{get;set} public int UserId{get;set;} // foreign key } How can i update a User.Id property with PetaPoco ? user.Update("set id = @NewId where id = @OldId",new…
amin
  • 3,672
  • 5
  • 33
  • 61
0
votes
1 answer

Does PetaPoco support a Sybase database?

My team is interested in using PetaPoco for one our projects however since the DBMS is Sybase we would want to know if PetaPoco supports it. If it does, any example of how the connection string would look like will be very much appreciated. Thank…
MaYaN
  • 6,683
  • 12
  • 57
  • 109
0
votes
1 answer

How auto retrieve data from database in mvc?

It is a create view page where i have insert supplier information and it is inserting data successfully. i want to get this data automatically when i will enter a name and it exist it will show all of the data in these field, if not exist then i…
MNAH
  • 71
  • 1
  • 10
0
votes
0 answers

String parameters are not passing in mvc?

i want to pass parameters for details page. but my parameters are not passing. In my table primary key is ExpRef. How i can pass this string parameter in details page... public ActionResult Details(string id) { var db = new…
MNAH
  • 71
  • 1
  • 10
0
votes
1 answer

Why showing it is null parameter?

I have wrote this code to see details in details view with petapoco. but it is not showing any data and it also showing null parameter. I have added and details view page.. here my database name FCBook and table is RMReceive and primary key is…
MNAH
  • 71
  • 1
  • 10
0
votes
1 answer

How to do multiple inserts with a Petaoco query

I am using DNN7.1 and it´s DAL2 which is based on petapoco. I want to insert and update multiple items at once to reduce network traffic and connections to my SQL Server db. This is from my "ServiceController.cs": [AllowAnonymous] …
Asle G
  • 568
  • 7
  • 27
0
votes
2 answers

PetaPoco in WinForms

How to commit changes done in DataGridView using PetaPoco ? Something like : namespace PetaPocoTest { public partial class Form1 : Form { PetaPoco.Database db = new PetaPoco.Database("PgConnection"); IEnumerable
EmirZ
  • 646
  • 4
  • 10
  • 21
0
votes
1 answer

Error At Using PetaPoco Database in C#

well i have Added PetaPoco.cs file inside my project but when i set the connection string to be used by database Public constructor method ..it show me an error saying that it couldnt connect through database as there is smthing wrong in Connection…
0
votes
1 answer

PetPoco Mapping ignore column

I am doing an insert into a table using petapoco. The insert was working fine until I introduced a property on the class that was calculated and didn't map to any column in the table. Now the code breaks because it is not able to map that…
developer747
  • 15,419
  • 26
  • 93
  • 147
0
votes
1 answer

Petapoco Could not find split point between 2 tables

I am using petapoco. and joining with 6 tables i am getting exception : can not make split point betweeen 2 tables, please let me know if any one have an idea about it. //Data Access public static List
user2734405
  • 43
  • 1
  • 9
0
votes
1 answer

Peta POCO like query issue

I am using Micro ORM PetaPOCO, and I want to use like query, i am getting exception, please help me if any one know. var context = new PetaPoco.Database(Connection.connectionstring); SqlQuery = @"SELECT CmsPage.PageId, CmsPage.PageTitle,…
dotnetexpert
  • 145
  • 2
  • 16
0
votes
1 answer

Can I define custom type mapping for parameters and fields in PetaPoco?

I'm currently trying to pick a C# ORM to use with my PostgreSQL database, and I'm interested in the micro-ORMs, since they allow me to better utilize the power of Postgres(and since full blown ORMs are hard to configure. While Dapper simply works,…
Idan Arye
  • 12,402
  • 5
  • 49
  • 68