problem about petapoco-Collection of common programming errors


  • Troy Alford
    c# .net c#-4.0 .net-4.0 petapoco
    I am using PetaPoco Micro-ORM with C# 4.0.The code below retrieves a single row from the database:var result = db.SingleOrDefault<TdUsers>(getUserQuery);I would like to check whether or not the result contains any rows, and whether is null. What is the best way to do this?

  • learning
    petapoco
    I am having a project in which I have my API classes and in that project I have generated the Database.cs. In my MVC project I have refenrenced the API. Uppon running the application I am having the error message as follows, can anyone help please as I can`t understand why I am having this error message. From http://www.garethelms.org/2011/05/help-getting-started-with-petapoco/#comment-69, I can see that all the GetSetMethod() are GetSetMethod(true) ever since the petaPOCo is installed.Value

  • Ollie P
    c# asp.net-mvc-4 petapoco npoco
    I am using NPoco for object mapping from my database. I have the following entities:public abstract class NamedEntity {public int Id { get; set; }public string Name { get; set; } }public class Person : NamedEntity {public Office Office { get; set; } }public class Office : NamedEntity {public Address Address { get; set; }public Organisation ParentOrganisation { get; set; } }public class Address {public string AddressLine1 { get; set; } }public class Organisation : NamedEntity { }and I am retrievi

  • Idan Shechter
    asp.net petapoco
    I am running PetaPoco template T4 on my database and it generates the following error:Running transformation: System.InvalidOperationException: Sequence contains more than one matching elementReported from the file ‘database.ttMy database is modeled correctly, however most of the tables have no records, although I tihnk that it’s nothing to do with it, is it?I’m querying a MySQL local database. I’ve setup the connection string in the web.config and this is the only connection string in the w

Web site is in building