Data dodania Pytanie
2017-06-12 15:06 How to pass primitive data to asp.net core middleware »
I need to pass some data into a ASP NET CORE middleware e.g. if this is a list of strings, do you use the same mechanism as passing in a service? e....
(1) odpowiedzi
2017-06-12 15:06 Retrieve Xml and string data in JSON Format from WebAPI »
I have created a WebAPI which i need to convert strings and Xml data into JSON resultset for my application. But what resultset i am getting is not th...
(1) odpowiedzi
2017-06-12 11:06 How is a c# lambda capturing variables »
Why does the following code print 11 twice? int i = 10; Action fn1 = () => Console.WriteLine(i); i = 11; Action fn2 = () => Console.WriteLine(i...
(3) odpowiedzi
2017-06-12 10:06 how to increment object property name in a loop »
in my list of objects i have few similar properties. week1 week2 week3 week4 week5 ... I would like to be able to display them in a table based on ...
(2) odpowiedzi
2017-06-12 03:06 .NET WebApi Async Controller Action Executes Forever »
I am having a tough time following.NET Async/Await examples, such as the official MDN tutorial. From what I gather, to make a controller action async...
(1) odpowiedzi
2017-06-12 02:06 .NET MVC Get info from Partial views »
I am pretty new to MVC and doing a project for a charity. The project is a basic order management service. It doesn't need to be overly complicated th...
(1) odpowiedzi
2017-06-11 23:06 How to create named reference-type tuples? »
The following line creates a named ValueTuple: var tuple = (a:1, b:2, c:3, d:4, e:5, f:6); Value types can not be passed around efficiently. Do...
(1) odpowiedzi
2017-06-11 23:06 Facebook: which token is suited to read from an open group »
I am starting with the Facebook Graph API, however I am really confused by their access policies. When compared to Google, Facebook is just terrible a...
(1) odpowiedzi
2017-06-11 20:06 Using ExecuteScalar() in place of ExecuteReader() »
I am learning Web API and working on a small project (I know this question is not related to Web API, but just to get to the scene). So I have this fu...
(1) odpowiedzi
2017-06-11 17:06 Use Angular Id value from ng-reapt in a razor @Url.Action link »
I am trying to pass values to my controller action from link in View: Controller: public ActionResult Details(DetailsViewModel vm) { if (vm.CarI...
(1) odpowiedzi
2017-06-11 14:06 ASP.net web api returns list of empty objects »
I have an action, which shoeuld return a limited list of store items from a DB, here the code below [HttpGet] public IEnumerable<ProductIn...
(1) odpowiedzi
2017-06-11 13:06 Opening connections to multiple databases »
I want to connect to multiple databases and want to run some query on through those connections, but it's not working. string source = "1...
(1) odpowiedzi
2017-06-11 12:06 Why we cant update UI from worker thread? same as other variables/object »
Feel like asking a stupid question but I want to know answer. I don’t need any code to update UI from worker thread I know how to update UI from wor...
(4) odpowiedzi
2017-06-11 09:06 Identity Server 4 and docker »
I'm trying to configure IdentityServer4 with docker but I cannot make it work. To get started, I took the Client Credential example of the identity se...
(1) odpowiedzi
2017-06-11 05:06 How do you change the icon of the `wwwroot` folder in a .NET Core project? »
In Visual Studio 2017, when I want to create an ASP.NET Core Web Application from scratch using either one of these standard .NET Core project templat...
(1) odpowiedzi
2017-06-11 03:06 Websockets connection failing only with Chrome accessing ASP Core Server using subprotocol »
I have a MQTT client / broker implementation, client is browser websockets based, server is ASPNetCore 1.1 with Kestrel & Websockets (0.1.0). As ...
(0) odpowiedzi
2017-06-11 01:06 Custom Relative Path In Asp.Net Core MVC »
Is there any possibility to have a custom relative path same as example at below: In Razor: <script src="%/scripts/theme.js" type="text/javascrip...
(2) odpowiedzi
2017-06-10 23:06 How does FirstAsync work? »
In my everlasting quest to suck less I'm trying to understand Rx.net's FirstAsync() syntax. Most documentation is for the deprecated First() If I unde...
(4) odpowiedzi
2017-06-10 21:06 ASP MVC WebApi returns error 'not found' »
"<!DOCTYPE html> <html> <head> <title>The resource cannot be found.</title> <meta name="viewport"...
(1) odpowiedzi
2017-06-10 19:06 why is WCF used for intranet services? »
I have a new project I am working on. The purpose of the project is to centralize all service calls and provide a single entry point to other services...
(1) odpowiedzi
2017-06-10 18:06 Why does the Xamarin equivalent of EditText.getText() return a string? »
I'm a new Xamarin.Android developer. I was reading through some Java code recently that used EditText methods in a derived class. One of the derived c...
(1) odpowiedzi
2017-06-10 18:06 Runtime compile other files than cshtml views »
I'm working on an ASP.NET MVC 5 + WebAPI 2 application. For flexibility purposes, the stakeholders insist that the integration guys should be able to ...
(0) odpowiedzi
2017-06-10 18:06 How to get all document fome mongodb collection name (Services) by using C# webapi 2? »
I have a model return a list of collection name Service : public IEnumerable<BsonDocument> ServicesBsonLits { get; set; } and I have an Actio...
(0) odpowiedzi
2017-06-10 11:06 how to validate selectize dropdownlist in mvc 4.5? »
I am working with mvc in framework-4.5. In all other fields validation is working properly, but i am finding it difficult for selectize dropdownlist. ...
(0) odpowiedzi
2017-06-10 07:06 EntityFrameworkCore: How to save an entity with ForeignKey to another model? »
I have a model that relates to another: public class Portfolio : BaseEntity, IEntityBase { public string Name { get; set; } publi...
(1) odpowiedzi
2017-06-10 03:06 Remove <br/> from xmlnode »
My XML could look like this: <div> <p> First Text <br/> Second Text </p> </div> Loading...
(1) odpowiedzi
2017-06-09 20:06 Protect from multi requests - WebAPI »
I have next problem I have user. User has column in database - Tickets. - Ticket is internal currency. Now when User click on website BUY - I go to we...
(2) odpowiedzi
2017-06-09 18:06 how to add and subtract in C#? »
I am new to C# and I am trying to make a calculator. In Python(which I am more familiar with), You just import mathand then write out what it is you w...
(4) odpowiedzi
2017-06-09 17:06 CSS Textarea Not Filling Parent »
I am having issues getting a text area to fill a parent div. I have found solutions involving setting the box-sizing to border-box, but this is not wo...
(1) odpowiedzi
2017-06-09 16:06 html.hiddenfor error when rendering view outside controller as string »
I need server side page render (without request) outside controller(I want to render view outside controller). To do that, i need a fake HttpRequest...
(0) odpowiedzi
2017-06-09 16:06 LINQ Select From 3 Tables Dish/Images/ImageDish »
I have a problem doing a select from 3 tables. I'm using 3 tables because one product can have more than one image. Print DB Then I have my LINQ. ...
(1) odpowiedzi
2017-06-09 15:06 Reorder a collection of elements in minimum number of steps in C# »
I have a list of elements (namely PowerPoint slides) which I need to reorder in the minimal possible steps. Each slide has an integer unique key (nam...
(1) odpowiedzi
2017-06-09 14:06 Mocking ApiController SignalR broadcasting »
I'm trying to mock SignalR broadcasting present in ApiController(WebApi), but unable to complete test case, below is my code SignalRHub public clas...
(1) odpowiedzi
2017-06-09 13:06 How to serialize a C# DateTime as a Javascript Date using Web API »
In MVC, you can do something like this: public ActionResult Index() { return Json(new List<DateTime> { DateTime.Parse("19/02/2017") }, ...
(2) odpowiedzi
2017-06-09 13:06 MVC - Generic Actions »
I've got a page in an app I'm building. The page contains a few bits and pieces, then a partial view that loads a different view depending on what's s...
(0) odpowiedzi