sapiens/SqlFu

Column Mapping

Closed this issue · 1 comments

Kudos to SqlFu team. To me, this ORM is the most promising one. We are currently using PetaPoco which has become old and clumsy. I would really like to use SqlFu but stuck here.

How to map this

CREATE TABLE public.persons
(
    first_name    text,
    last_name     text
);

to this

public class Person
{
    public string FirstName { get; set; }
    public string LastName { get ; set ; }
}

In our case, it is safe to assume that all database objects follow underscore convention. How can I use SqlFu? Any help will be warmly appreciated.

Thanks for your kind words, however SqlFu is not and ORM, it's a micro-ORM (which is a very unfortunate name). Objects (POCOs) are just sources or destinations of data. There is no object to table mapping as it is with a real ORM.

I recommend to use SqlFu as a data mapper with helpers, instead of using ado.net but not as an ORM.