

- #MULTIPLE CONNECTIONS STRINGS FOR IDATABASE NPOCO HOW TO#
- #MULTIPLE CONNECTIONS STRINGS FOR IDATABASE NPOCO SOFTWARE#
- #MULTIPLE CONNECTIONS STRINGS FOR IDATABASE NPOCO CODE#

#MULTIPLE CONNECTIONS STRINGS FOR IDATABASE NPOCO CODE#
The code is also available at Github, so go have a look, give it a try, send me a pull request and let me know how you get on. I’m still finalising all the documentation for these features, so if documentation doesn’t exist for one of the let me know and I will prioritise that feature.
#MULTIPLE CONNECTIONS STRINGS FOR IDATABASE NPOCO SOFTWARE#
Mapping to Nested Objects query helpers helps developers connect software to data.
#MULTIPLE CONNECTIONS STRINGS FOR IDATABASE NPOCO HOW TO#
It includes basic documentation of how to use the library as well as the features only in NPoco. There is also a fair bit of documentation about NPoco located at the Wiki. I do take pull requests if you like this feature of PetaPoco and want it in NPoco.

Why did I create this library? Well there was becoming too much divergence and it was always a pain that I couldn’t obtain my branch through NuGet.Ĭurrently I’m working on V2 which is available now on NuGet if you use the –Pre console switch or by selecting “Include Prerelease” in Visual Studio. If you don’t know what PetaPoco is, it is a MicroORM that enables quick and fast database access using raw sql. Var entity = updateContext.NPoco is the new library from my PetaPoco branch. Public AppNameDatabase (DbConnection connection) : base(connection)
Database(Has anyone done this yet with V8, if so, please help! :-)Īccording to my knowledge you have to create a class first and in that class override these events and to trigger these events you have to create that class object and return to your repo layerįor example: public class AppNameDatabase : Database We have an issue where we have multiple Mappings/Types to include, and they werent getting bound. Var entity = updateContext.Poco as CommonEntity īut I am pretty sure I need to register this with Umbraco somehow as it doesn't work out of the box. Protected override bool OnUpdating(UpdateContext updateContext) If (insertContext.Poco is CommonEntity entity) Queries that returns Multiple Result Sets Fluent Mappings including Conventional based mappings Version column support IDatabase interface Sql Templating I’m still finalising all the documentation for these features, so if documentation doesn’t exist for one of the let me know and I will prioritise that feature. Protected override bool OnInserting(InsertContext insertContext) Public DatabaseEvents(DbConnection connection) : base(connection) The example from Npoco shows ( (Insert,-Update,-etc)): public class DatabaseEvents : Database I am inserting/updating (or at least will be when this works!) data to custom database tables as per the documentation, but I want to subscribe to Npoco database events (OnInserting, OnUpdating, etc.) so that I can auto-populate things like timestamp fields. Sorry if this is in the docs, I have done a bit of searching and have not found an answer as yet.
