Skip to content

Latest commit

 

History

History
193 lines (130 loc) · 5.85 KB

File metadata and controls

193 lines (130 loc) · 5.85 KB

Contributors Forks Stargazers Issues project_license LinkedIn


Logo

LightSpeed.DbClient

A C# database client optimized for speed and code efficiency
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

A C# database client optimized for speed and code efficiency

(back to top)

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

TODO

(back to top)

Installation

TODO

(back to top)

Usage

IDatabase db = new PostgresqlDatabase("localhost",5432,"backend", "backend", "mysecretpassword");
IConnection connection = await db.OpenConnectionAsync();
ITransaction transaction = await connection.BeginTransactionAsync();
IManager<Product> productManager = new PostgresqlManager<Product>(connection, transaction);    

try {

  Product product = productManager.CreateObject();
  product.Id = Guid.NewGuid();
  
  AttributeRow row = new AttributeRow
  {
      Id = Guid.NewGuid(),
      Attribute = attribute.Id,
      AttributeName = attributeName,
      Value = value,
  };
  product.Attributes = new DatabaseObjectTable<AttributeRow>();
  product.Attributes.Add(row);
  
  var result = await productManager.SaveAsync(product);
  await transaction.CommitAsync();
  
} catch (Exception e)
{
    await transaction.RollbackAsync();
}

(back to top)

Roadmap

  • Postgresql implementation refactoring

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Top contributors:

contrib.rocks image

License

Distributed under the project_license. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @viskvortsov - viskvortsovkrsk@gmail.com

(back to top)

Acknowledgments

TODO

(back to top)