-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reactor : add crm configuration (#667)
* feat : Add DynamicsCrmDbContext * chore : Remove useless code * chore : Handling code odors * chore : Handling code odors * chore : Handling code odors * chore : Handling code odors * reactor : add crm configuration * chore : Dealing with bad odors * chore : Dealing with bad odors
- Loading branch information
Showing
4 changed files
with
43 additions
and
11 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/Utils/DynamicsCrm/Masa.Utils.DynamicsCrm.Core/ServiceCollectionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) MASA Stack All rights reserved. | ||
// Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
|
||
namespace Masa.Utils.DynamicsCrm.Core; | ||
|
||
public static class ServiceCollectionExtensions | ||
{ | ||
public static IServiceCollection AddCrmConfiguration(this IServiceCollection services, Action<CrmConfiguration> crmConfigurationAction) | ||
{ | ||
var crmConfiguration = new CrmConfiguration(); | ||
crmConfigurationAction.Invoke(crmConfiguration); | ||
|
||
services.TryAddSingleton<ICrmConfiguration>(crmConfiguration); | ||
|
||
return services; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/Utils/DynamicsCrm/Masa.Utils.DynamicsCrm.Core/_Imports.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
global using System.ComponentModel.DataAnnotations.Schema; | ||
global using Masa.BuildingBlocks.Ddd.Domain.Entities; | ||
global using Masa.BuildingBlocks.Authentication.Identity; | ||
global using Masa.Utils.DynamicsCrm.Core.Configurations; | ||
global using Microsoft.Extensions.DependencyInjection; | ||
global using Microsoft.Extensions.DependencyInjection.Extensions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters