A feature-rich, high-performance dependency injection container for .NET with a fluent API and extensive lifestyle support.
Grace is a dependency injection container library for .NET that provides a fluent interface and attribute-based configuration for managing object dependencies. It solves the problem of tightly coupled code by enabling loose coupling, testability, and maintainability through inversion of control. The library is designed with performance in mind, offering fast resolution times and extensive features like lifestyle management and special type support.
.NET developers building applications that require scalable and maintainable dependency management, particularly those using ASP.NET Core or complex object graphs. It suits teams looking for a high-performance alternative to built-in DI containers.
Developers choose Grace for its combination of a flexible configuration API, benchmark-leading performance, and advanced features like contextual binding and custom lifestyles. Its support for special types (e.g., Func<T>, Lazy<T>) and decorator patterns reduces boilerplate code, while integration with ASP.NET Core ensures modern framework compatibility.
Grace is a feature rich dependency injection container library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports both fluent interface and attribute-based configuration, allowing developers to choose the method that best fits their workflow, as highlighted in the README for maximum flexibility.
Benchmarks show Grace as one of the fastest DI containers available, optimized for high-throughput scenarios, making it ideal for performance-sensitive applications.
Offers a wide range of lifestyles like SingletonPerScope and custom implementations, enabling precise control over object lifetimes for complex dependency graphs.
Automatically handles complex types such as IEnumerable<T>, Func<T>, and Lazy<T>, reducing boilerplate code and simplifying common dependency patterns.
The author has announced Grace is being sunsetted, meaning no future updates, bug fixes, or official support, which poses a significant risk for production use.
The extensive feature set and configuration options can be overwhelming and time-consuming to set up compared to simpler, more opinionated DI containers.
Has fewer third-party extensions and community resources compared to mainstream alternatives like Autofac or the built-in .NET DI, reducing ease of integration and troubleshooting.