You can manipulate the PetaPoco maps as you wish using ExplicitColumns
to map to a different named column. You can also use ResultColumn
for properties that you wish to grab from the DB for not update/insert. Finally, you can also use unmapped properties for extra work not related to the DB.
namespace Site.Models {
[TableName("Hotel")]
[PrimaryKey("HotelID")]
[ExplicitColumns]
public class Hotel {
[PetaPoco.Column("HotelID")]
public int HotelID { get; set; }
[PetaPoco.Column("HotelClaseID")]
public int? HotelClaseID { get; set; }
[ResultColumn]
public string HotelClase { get; set; }
[Required]
[PetaPoco.Column("Nombre")]
public String Nombre { get; set; }
....