Aware 1.0.4

dotnet add package Aware --version 1.0.4
                    
NuGet\Install-Package Aware -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aware" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aware" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Aware" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aware --version 1.0.4
                    
#r "nuget: Aware, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aware@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aware&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Aware&version=1.0.4
                    
Install as a Cake Tool

[Aware]

NuGet
Downloads

[Aware] is a .NET Core lightweight library for simplifying backend project management with minimum code effort and rapidly]. A sample Ticket Sales API project that use power of Aware is available at Github page.


Installation

Using the NuGet Package Manager

  1. Open your project in Visual Studio.
  2. Go to ToolsNuGet Package ManagerManage NuGet Packages for Solution....
  3. Search for [Aware].
  4. Click Install.

Using the .NET CLI

Run the following command in your project directory:

dotnet add package Aware

Using the PackageReference

If you prefer adding the dependency manually, edit your .csproj file and add:

<ItemGroup>
    <PackageReference Include="Aware" Version="[VersionNumber]" />
</ItemGroup>

Replace [VersionNumber] with the desired version (you can check available versions on the NuGet page.


Changes

Version 1.0.4

  1. IAwareCache removed on behalf of IDistributedCache. Now memory cache or redis cache automatically injected according to AwareSettings.CacherType value.
  2. RedisUrl added to AwareSettings to configure redis.
  3. ApplicationName added to AwareSettings. For now, Aware use it to configure RedisInstanceName.
  4. AwareDependencyInstaller updated to configure caching based on AwareSettings.CacherType value.
  5. SaveBulk method added to BaseManager
  6. WithManager(), SearchBy(), First(), Search() methods added to SearchParams class to improve searching experience.
  7. Small code fixes & refactorings
  8. Ticket Sales Web API repository updated based on these changes

Version 1.0.3

  1. MenuItemManager and SliderItemManager added for menu and slider needs.
  2. AwareDependencyInstaller enhancements & refactors : WithMenuManagement, WithSliderManagement, WithEntityFramework
  3. Search improvements : AwareAuthorizedSearchController added for custom search params usage.
  4. Search improvements : sort operations are now more stable.
  5. BaseManager and UnitOfWork now has Any() method support.
  6. DependencySettings renamed as AwareSettings and moved to Aware.Util namespace and now can be configured from appsettings.json file and can injected as IOptions<AwareSettings>
  7. You can now configure deletion mode as Hard Delete or Soft delete. Default value is Hard Delete but can be configure from AwareSettings
  8. BaseManager now has Active() and Passive() methods which allow to change state or status of an entity.
  9. Small code fixes & refactorings
  10. Ticket Sales Web API repository updated based on these changes

Version 1.0.2

  1. UserManager now has JWT Web Token support
  2. AwareJwtMiddleware added to handle JWT Web Token validation
  3. AwareDependencyInstaller improved to take a settings parameter, DbContextFactory class moved to Aware. You can now add EF support by calling InstallEntityFramework<YourDbContext>().
  4. IBaseManager<EventEntity, EventItemDto> simplified to IBaseManager<EventItemDto>
  5. Search iprovements
  6. AwareEmptyController, AwareController and AwareAuthorizedController added to init controllers and enable access to Current logged in user info for authorized pages
  7. DateModified and UserModied fields of BaseEntity are now nullable.
  8. Small code fixes & refactorings
  9. Ticket Sales Web API repository updated based on these changes

Usage

//Configure Aware Functionality, check arrange method
var libraryInstaller = new LibraryInstaller();
libraryInstaller.Arrange(builder.Services, builder.Configuration, Assembly.GetExecutingAssembly());


//Customize Aware dependency installation
public class LibraryInstaller : AwareDependencyInstaller
{
    public void Arrange(IServiceCollection services, IConfiguration configuration, Assembly callerAssembly)
    {
        Install(services, configuration, callerAssembly)
            .WithMenuManagement(services, Settings.ServiceLifetime)
            .WithSliderManagement(services, Settings.ServiceLifetime)
            .WithEntityFramework<TicketSalesDbContext>(services)
            .WithJwtAuthentication(services, configuration);

        services.AddAuthorization();
    }
}

//Controller for CRUD operations
public class EventController(IEventService eventService, IEventSessionService eventSessionService) : AwareAuthorizedSearchController<EventItemDto, EventSearchParams>(eventService)
{
}

//And here is the EventService and IEventService with empty body :)

public interface IEventService : IBaseManager<EventEntity, EventItemDto> { }

public class EventService(IServiceProvider serviceProvider) : BaseManager<EventEntity, EventItemDto>(serviceProvider), IEventService { }


Supported Platforms

  • .NET 8
  • .NET 7
  • .NET 6
  • .NET 5

License

This package is licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 96 1/6/2025
1.0.3 95 12/17/2024
1.0.2 89 12/9/2024
1.0.1 90 12/5/2024
1.0.0 95 12/5/2024