Category "c++sharp"

Parameterizing a raw Oracle SQL query in Entity Framework

I'm trying to parameterize a raw SQL query for an Oracle synonym (non-entity) in EF 4 and I am having some problems. Currently I am doing something like the co

Unable to resolve service for type while attempting to activate

In my ASP.NET Core application, I get the following error: InvalidOperationException: Unable to resolve service for type 'Cities.Models.IRepository' while atte

"Could not locate MSBuild instance to register with OmniSharp" but msbuild is installed

Due to the third party system we work against, I have to use .Net 2.1, which has worked fine until recently. I develop on Fedora with latest updates and VSCode

Call a function when button is clicked in a different window (WPF app)

I launch a window from a page of my wpf app and I would like to call a function when a button is pressed in the child window Here is the page that calls the wi

How to SetBasePath in ConfigurationBuilder in Core 2.0

How can I set the base path in ConfigurationBuilder in Core 2.0. I have googled and found this question, this from Microsoft docs, and the 2.0 docs online but

Bypass/Ignore Exchange Server "Maximum Send Size"?

As soon as possible I will start a bounty and award 150 (that's what I have) points for solution. I am developing Outlook add in. When message is sent, add in

How can I filter Salesforce SObjects for mappable objects

I have a C# application which contains objects whose data I want to transfer to Salesforce using the REST API. I would like to allow my users to create a mappin

How to log dotnet test output in junit format

dotnet test uses trx output by default. I am using trx2junit to convert it to junit, but this complicates CI setup. Is it possible to output test report in juni

.Net Core 2.0 Process.Start throws "The specified executable is not a valid application for this OS platform"

I need to let a .reg file and a .msi file execute automatically using whatever executables these two file types associated with on user's Windows. .NET Core 2.

Create a StackLayout inside a Frame in Xamarin Forms using C# as background code

I use an <Frame> in my xaml page like this: <StackLayout> <Frame> <StackLayout> <Button></Button>

How can I configure Moq to return new instance per call?

I am trying to write a simple test with moq. When calling the mocked method for the second time, after changing the return value from the first call, the moq fr

Could not locate MSBuild instance to register with OmniSharp

I have found many questions about this but non have helped me. I am trying to write c# code and the omnisharp auto complete doesn't work and I get this back fro

EntityFramework in test initialization error: CREATE DATABASE statement not allowed within multi-statement transaction

I'm trying to build a quick test that deletes and recreates a database every time it runs. I have the following: [TestClass] public class PocoTest { priva

What does the => operator mean in a property?

I came across some code that said public int MaxHealth => Memory[Address].IsValid ? Memory[Address].Read<int>(Offs.Life.MaxHp) :

ClickOnce application working fine in IE and not in other browsers

ClickOnce application working fine in IE and not in other browsers as it's own they depends on some plug-in's. Can anybody give me suggestion or solution that

System.Net.WebException: Error: NameResolutionFailure when Calling WEBAPI in xamarin forms

I have created one simple xamarin form application using PCL, which is showing data in listview using WEBAPI. When i call WebAPI , i am getting below error. ex

WEBAPI not working when i add server ip address instead of name?

I have created WEBAPI application using VS2017 and deployed into IIS. After replace my server ip address instead of msweb102 like below URL, i am getting error.

How to ignore the format error flag in the cell number format

My code: columns = ws.get_Range("A:F", System.Type.Missing); columns.NumberFormat = "@"; After I debug the program, there is green color flag beside my number

Find the second maximum number in an array with the smallest complexity

Tried to googled it but with no luck. How can I find the second maximum number in an array with the smallest complexity? code OR idea will be much help. I can

JSON file as database

I'm tring to use a JSON file as database for static content in ASP.net (an image gallery). Everything works well: I can read the file and retrieve data and disp