PHPackages                             joedevsharp/entitylite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. joedevsharp/entitylite

ActiveLibrary[Database &amp; ORM](/categories/database)

joedevsharp/entitylite
======================

A lightweight PHP ORM inspired by Entity Framework, designed to simplify database interactions and provide an intuitive way to manage entities and relationships. This library utilizes a fluent interface and follows the PSR-4 autoloading standard, making it easy to integrate into any PHP project. With support for basic CRUD operations and a focus on simplicity and performance, this ORM empowers developers to work with databases seamlessly while maintaining clean and maintainable code.

0.2.2(1y ago)015PHPPHP &gt;=7.4

Since Sep 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/JoeDevSharp/EntityLite)[ Packagist](https://packagist.org/packages/joedevsharp/entitylite)[ RSS](/packages/joedevsharp-entitylite/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

Here is a documentation draft for your `EntityLite` library in PHP, including code examples to demonstrate how to use its components effectively.

---

EntityLite Documentation
========================

[](#entitylite-documentation)

**EntityLite** is a lightweight PHP ORM inspired by Entity Framework, designed to simplify database interactions using an object-oriented approach. This documentation provides an overview of the core classes and how to use them.

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Database Connection](#database-connection)
3. [DbContext](#dbcontext)
4. [Entity and DbSet](#entity-and-dbset)
5. [BaseRepository](#baserepository)
6. [Example Usage](#example-usage)

Installation
------------

[](#installation)

Make sure to include the `EntityLite` library in your project. If you are using Composer, ensure your `composer.json` is properly configured.

```
{
  "require": {
    "joedevsharp/entitylite": "^1.0"
  }
}
```

```
composer require joedevsharp/entitylite
```

Database Connection
-------------------

[](#database-connection)

To connect to your database, you will use the `Database` class. It requires the database credentials to establish a connection.

```
