.net-core

NET core 2.0 Swagger & Enum Display

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-15 05:28:44
问题 i have the next enum : public enum DataTypes { [Description("All")] All, Man, Woman } and i want to achive next : to display decription for each enum to display the Enum Key and Value. i used this next post : swagger-ui-web-api-documentation-present-enums-as-strings I did the next code changes : in the enum, i defined : [JsonConverter(typeof(StringEnumConverter))] //this is using newton public enum DataTypes { [Description("All")] All, [Description("Male222")] Male, [Description("Female")]

Odata.bind error when creating a team with microsoft graph

大憨熊 提交于 2020-12-15 05:15:31
问题 I'm using miscrosoft graph with .net core to create a team in Microsoft Teams. But when I send the request for the team creation I always get an error message: Invalid bind property name template in request. To do that, I followed the step required in the documentation here: https://docs.microsoft.com/en-us/graph/api/team-post?view=graph-rest-beta&tabs=csharp#example-4-create-a-team-from-group I already tried a bunch of example from the Microsoft documentation, from the v1.0 and beta one. My

Odata.bind error when creating a team with microsoft graph

僤鯓⒐⒋嵵緔 提交于 2020-12-15 05:15:12
问题 I'm using miscrosoft graph with .net core to create a team in Microsoft Teams. But when I send the request for the team creation I always get an error message: Invalid bind property name template in request. To do that, I followed the step required in the documentation here: https://docs.microsoft.com/en-us/graph/api/team-post?view=graph-rest-beta&tabs=csharp#example-4-create-a-team-from-group I already tried a bunch of example from the Microsoft documentation, from the v1.0 and beta one. My

Methods to persist CSV data using PowerShell on Linux?

折月煮酒 提交于 2020-12-15 04:54:59
问题 From Linux, might there be a "native" or built-in convenient "database" facility from withing Powershell itself? While this works fine for importing data: nicholas@mordor:~/csv$ nicholas@mordor:~/csv$ ll BCCDC_COVID19_Dashboard_Lab_Information.csv -rw-rw-r-- 1 nicholas nicholas 89153 Nov 22 05:16 BCCDC_COVID19_Dashboard_Lab_Information.csv nicholas@mordor:~/csv$ nicholas@mordor:~/csv$ pwsh PowerShell 7.1.0 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help.

Methods to persist CSV data using PowerShell on Linux?

三世轮回 提交于 2020-12-15 04:54:47
问题 From Linux, might there be a "native" or built-in convenient "database" facility from withing Powershell itself? While this works fine for importing data: nicholas@mordor:~/csv$ nicholas@mordor:~/csv$ ll BCCDC_COVID19_Dashboard_Lab_Information.csv -rw-rw-r-- 1 nicholas nicholas 89153 Nov 22 05:16 BCCDC_COVID19_Dashboard_Lab_Information.csv nicholas@mordor:~/csv$ nicholas@mordor:~/csv$ pwsh PowerShell 7.1.0 Copyright (c) Microsoft Corporation. https://aka.ms/powershell Type 'help' to get help.

How to export XML from a SQLite query to a file with PowerShell?

旧巷老猫 提交于 2020-12-15 03:36:02
问题 Using Linux , getting started with SQLite , PowerShell and xml , and so this question is in that context. How do I nicely export the results below? PS /home/nicholas> PS /home/nicholas> $Database /home/nicholas/sql/covid.db PS /home/nicholas> PS /home/nicholas> $Query select * from labs limit 3 PS /home/nicholas> PS /home/nicholas> Invoke-SqliteQuery -DataSource $Database -Query $Query Date : 1/23/2020 12:00:00 AM Region : BC New_Tests : 2 Total_Tests : 2 Positivity : 0 Turn_Around : 32 Date

.NET Core 3.1 API Calling .NET Framework WCF Service secured using windows authentication (AD Group)

…衆ロ難τιáo~ 提交于 2020-12-15 02:43:45
问题 I am trying to call a .NET Framework WCF Service (which is secured by Windows Authentication using an AD group) from a .NET Core 3.1 API however I am getting the error message: System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate, NTLM'. The .NET Core API is hosted in IIS both on windows and the app pool that it runs under has a domain account

.NET Core 3.1 API Calling .NET Framework WCF Service secured using windows authentication (AD Group)

China☆狼群 提交于 2020-12-15 02:43:03
问题 I am trying to call a .NET Framework WCF Service (which is secured by Windows Authentication using an AD group) from a .NET Core 3.1 API however I am getting the error message: System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate, NTLM'. The .NET Core API is hosted in IIS both on windows and the app pool that it runs under has a domain account

.NET Core 3.1 API Calling .NET Framework WCF Service secured using windows authentication (AD Group)

对着背影说爱祢 提交于 2020-12-15 02:39:02
问题 I am trying to call a .NET Framework WCF Service (which is secured by Windows Authentication using an AD group) from a .NET Core 3.1 API however I am getting the error message: System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate, NTLM'. The .NET Core API is hosted in IIS both on windows and the app pool that it runs under has a domain account

.NET core write better unit tests with Xunit + Autofixture + Moq

◇◆丶佛笑我妖孽 提交于 2020-12-13 07:07:40
问题 In .NET Core for unit testing, I'm using Xunit, Moq, and Autofixture. But even with them, I see that my unit tests become complicated and take time. Maybe someone could tell me if there are any ways to make this test smaller? [Fact] public async Task Verify_NotAuthorised_NoServiceSendInvoked() { // Arrange var fixture = new Fixture() .Customize(new AutoMoqCustomization()); var sut = fixture.Create<VerificationService>(); var mockApiBuilder = fixture.Freeze<Mock<IApiEntityBuilder>>(); //init