Data dodania Pytanie
2017-02-11 08:02 Is there a way to precompile razor in asp.net core 1.0.3? »
I know this is not possible directly.Also is there any substitute c# code that I can use instead. I want the razor replace feature. eg string template...
(0) odpowiedzi
2017-02-11 05:02 ASP.NET Core and ViewModelFactory »
Hello, I'm trying to implement a ViewModelFactory "pattern" and I was wondering what's the best way to achieve it, considering the constraints of th...
(2) odpowiedzi
2017-02-11 01:02 How to efficiently get unique combinations of a list of objects »
I have a single list of objects that I want to make unique combinations from. The objects that I have are (CityObj); public string City_Name; public...
(2) odpowiedzi
2017-02-11 01:02 C# Contracts vs NotNull/roll your own in Java »
I would like to reduce redundant and verbose null checks in Java , but I understand Java does not have a standard @NotNull annotation where as c# has ...
(1) odpowiedzi
2017-02-11 00:02 Compiler warning when using const boolean »
I stumbled on a surprising compiler warning using the following code: private const bool DEFAULT_SETTING = false; //... string aString = (DEFAULT_SET...
(3) odpowiedzi
2017-02-10 22:02 How to Get WWWForm in a WEB API »
In my WebApi i have this POST-Method: [HttpPost] [EnableCors(origins: "*", headers: "*", methods: "*")] [Route("api/user/save")] publ...
(1) odpowiedzi
2017-02-10 17:02 EmailAddressAttribute incorrectly categorizing French e-mail address as invalid »
I'm using the EmailAddressAttribute for use on my model. The problem is when I use a (perfectly valid) e-mail address of óscar@yahoo.com it says...
(5) odpowiedzi
2017-02-10 16:02 Regex challenge: changing formats of negative numbers »
First of all, I think I have to apologize for not having that much knowledge of regular expressions (yet). I have searched and searched, but haven't f...
(1) odpowiedzi
2017-02-10 12:02 Controller parameterless public constructor error using Unity.WebApi and unity config in the web.config »
My WebApi service works when using the runtime Unity configuration, but when I changed it to use the unity configuration from the web.config I get the...
(1) odpowiedzi
2017-02-10 08:02 Pass nullable boolean to partial view not working when value is null »
I'm trying to do this in my razor view: @{ Html.RenderPartial("_Checkbox", Model.SomeNullableBoolean); } _Checkbox.cshtml: @model bool? @if (Mod...
(2) odpowiedzi
2017-02-10 06:02 Is there a way to get the time spent in request queue in Kestrel/ASP.NET Core? »
My understanding is that ASP.NET Core middleware is run when a request is ready to be processed. But if the app is under load and ASP.NET Core can not...
(1) odpowiedzi
2017-02-10 05:02 Get property by dynamic key name? »
I'm a big noob okay, so please bare with me... Basically, I'm trying to avoid duplicating some templates, let's say I have the following (very simpli...
(1) odpowiedzi
2017-02-10 03:02 Why does encrypting HMAC-SHA1 in exactly the same code in C# and PowerShell show different results? »
I've been trying to encrypt a Amazon S3-like authorization key with HMAC-SHA1 in PowerShell with the following code: $str="PUT\n\napplication/x-zip-c...
(1) odpowiedzi
2017-02-10 03:02 VS 2015 ASP.NET Web API (EF6) & Xamarin Enable-Migrations fails »
I'm developing a project that will use ASP.NET Web API as the data service, and a Xamarin portable app as client. I'm trying to enable migrations in ...
(1) odpowiedzi
2017-02-09 17:02 String interpolation issues »
I'm trying to figure out why my unit test fails (The third assert below): var date = new DateTime(2017, 1, 1, 1, 0, 0); var formatted = "{countdown|...
(3) odpowiedzi
2017-02-09 16:02 Can variables declared inside a for loop affect the performance of the loop? »
I have done my homework and found repeated assurances that it makes no difference in performance whether you declare your variables inside or outside ...
(2) odpowiedzi
2017-02-09 16:02 EnableCors not working in WebApi »
I followed the aspnet site tutorial to enable cors and i cant get it working. Register method on WebApiConfig: public static void Register(HttpCon...
(1) odpowiedzi
2017-02-09 15:02 Windows Task Scheduler OR TaskService Functions in WebApi »
I want to create some functions in ASP.NET Web API, which should be executed daily at specific time and do specific task like update statuses/Records/...
(4) odpowiedzi
2017-02-09 14:02 How to pass the ID of an object from a form to an action in ASP.NET MVC »
I have an ASP.NET MVC project with entities based on EF6 (model first). So my entities are all auto-generated for me. I have an entity, Site and I jus...
(2) odpowiedzi
2017-02-09 13:02 How to pass authorization token to GET method to access authorized resource? »
I am new to Token Based authentication. With reference to below links, I am trying to understand Token Based authentication. http://bitoftech.net/20...
(1) odpowiedzi
2017-02-09 11:02 How to make reusable controllers in Asp.Net Core »
I'm working on my first Asp.Net Core project, which is to support both a web client, and a Game client (written in Unity). Now, I started with the de...
(2) odpowiedzi
2017-02-09 10:02 Are there built-in Month name declensions in C# »
I'm wondering if there's any built-in functionality in .NET for declining dates in languages that support noun declensions, (ie. In Russian the month...
(2) odpowiedzi
2017-02-09 08:02 Jquery datatable get row id from button click »
I have two buttons rendered on each row in my datatable, Edit and Delete. Is it possible to grab the employee's ID or the Row's ID on the Delete or Ed...
(5) odpowiedzi
2017-02-08 20:02 Prevent CSRF in Web Forms using Ajax and Web Api in the server side »
I got a site where I need to avoid CSRF attacks. I have researched a lot of time and all examples use a function in the client side like this @functi...
(0) odpowiedzi
2017-02-08 13:02 Global assemby reference? »
I'm new to C# and ASP.Net core. I'm using ASP.Net core 1.1 and I have referenced a project, how can I make this referenced project globally visible t...
(1) odpowiedzi
2017-02-08 11:02 Console Application - WriteLine above current working line »
I have seen a few other posts very similar to this one, but the answers they give are not correctly answering the question. Sorry if there is somethin...
(2) odpowiedzi
2017-02-08 11:02 WEB API Routing Error Multiple actions were found that match the request with different API paths »
I'm implementing web API MVC in c#. My snippet implementation is: - WebApiConfig.cs config.Routes.MapHttpRoute( name: "getMultiProbe", routeTe...
(2) odpowiedzi
2017-02-08 09:02 What is the first argument in a parameterless constructor? »
I have simple program like this: public class Foo { public Foo() { } public int MyInt { get; set; } = 10; public List<int> ...
(3) odpowiedzi
2017-02-08 07:02 Unnecessary conversion to bigint »
I have employee table with bigint primary key field in database and entity data model with database first approach. Employee class have this structure...
(2) odpowiedzi
2017-02-07 21:02 Need to get request and response body and head in web Api2 project .How can i do it? »
Web Api2 project,,,Controller inherited from another controller ,,,,need to get every request's and response's body and head in json format ...
(1) odpowiedzi
2017-02-07 21:02 Using DataTable in .NET Core »
I have a stored procedure in SQL Server that accepts a User-Defined Table Type. I'm following the answer from this post Bulk insert from C# list into ...
(3) odpowiedzi
2017-02-07 21:02 Newtonsoft JSON ShouldSerialize and inheritance »
I have a class like this: public class Foo { public int Bar { get; set;} } This class is used to be stored in a NoSQL database so I need to sto...
(2) odpowiedzi
2017-02-07 15:02 Dynamic textbox binding to a list »
I am very new to MVVM and I am stuck with data binding. I have a button on my view page which dynamically creates text boxes but I cannot see how I b...
(1) odpowiedzi
2017-02-07 10:02 How does MVC handle button clicks in the controller »
How does MVC handle the submit button in my code? I have a controller named ArticleController which should handle it, but I can't figure out how. @{...
(4) odpowiedzi
2017-02-07 08:02 Why C# Null Conditional operator does not return Nullable<T>? »
I am just curious about that "Why null propagation operator does (or can) not give any information about the type such as returning null in type of Nu...
(1) odpowiedzi