Querying data from two databases in C#

I currently have a query where I am getting data from 2 different databases which is getting appended to one list called "accountbuys". My first table has three data entry(3 accounts which want to buy stocks The next table with 17 data points(17 st...
more »

2017-04-17 21:04 (2) Answers

Datetime displayed using JQuery Timeago

I am trying to display my date using the timeago plugin. This is what I have so far: <div class="container col-lg-12 col-md-12 col-xs-12 notifications-container"> @{ foreach (var n in Model.Notifications) { <div class="row"&...
more »

2017-04-17 20:04 (1) Answers

Entity Framework, adding table to existing conext

After following the steps for mapping an existing table to a model, I realized the table had some dependencies. For the last three times that helped, I just droped the whole DBContext and started again. I would like to just update my context for a...
more »

2017-04-17 20:04 (1) Answers

.NET MVC 6 App Settings

I'm trying to use configuration variables on my .NET MVC 6 project. This is where I've got so far: Created an appsettings.json Created an AppSettings class Now I'm trying to inject it on the ConfigureServices, but my Configuration class is either...
more »

2017-04-17 11:04 (2) Answers

how to use plaintext password as login with oauth?

i am going to develop a .net application with oauth mechanism which is going to use existing database table for user infomations ( this database is shared by few other applications) My question is this user_login table have plain password currently.C...
more »

2017-04-17 07:04 (1) Answers

asp.net routing syntax with no action

I'm trying to establish a route where there is no action but just a parameter: domain.com (without any parameter, should go to one controller) however, domain.com/somestring domain.com/anotherstring domain.com/anythingreally sho...
more »

2017-04-17 02:04 (1) Answers

Date dd/MM/yyyy isn't being populated in input

I'm working in an MVC application. I would like my date to be always in the format dd/MM/yyyy for example 16/04/2017. Here's a scenario from my application. I have a SaleOrder.cs entity, I have a public DateTime Date { get; set; } property. When vie...
more »

2017-04-16 16:04 (1) Answers

How to implement jQuery datepicker?

I've followed the instructions I've found online and installed jQuery.ui complete package from the package manager. I've played around a lot with it and I cannot get it to pop up when I run it. The following is all the relevant code in my view in whi...
more »

2017-04-16 00:04 (1) Answers

jwt token multi tenancy

Good evening everyone, I implemented in my asp net core project WebAPI validation via token, I create a token at each login and everything seems to work. my problem is that the app will be multi tanancy me, so I will have many subdomains client side...
more »

2017-04-15 21:04 (0) Answers

Require one field or another

Basically what I'm trying to figure out is how to require at least one of two fields to be filled out in a View. In my View, I have two text fields called ISBN and ISBN13. It doesn't matter which one the user fills in as long as one of them gets fil...
more »

2017-04-15 16:04 (3) Answers

Run code after returning data

in have a web api like this : public async Task<IHttpActionResult> PostTest(Model model) { db.UserOrders.Add(model); await db.SaveChangesAsync(); await PushUtils.SendPush("title" , "message"); // heavy task return Ok(); } in ...
more »

2017-04-15 14:04 (0) Answers

Entity Framework Core thread safe?

I follow Generic Repository Pattern in ASP.NET Core, but on IRepository, I use IQueryable instead of IEnumerable: public interface IRepository<T> where T: BaseEntity { IQueryable<T> Table { get; } IEnumerable<T> TableNoTra...
more »

2017-04-15 11:04 (1) Answers

Upload image in ASP.NET MVC 5 EF6

I've had a look at some other questions and tutorials, but I'm struggling to incorporate the suggestions into my existing work. I want the user to be able to upload an image in a submission form for a new listing, my listing model looks like this; ...
more »

2017-04-14 15:04 (1) Answers

How to make a List variable constant in ASP.NET

In this code, I am trying to check what rooms are available at the time that has been entered by the user. To test whether the room is free, I change the roomname to all the options and do a clash check. The problem is, is when I change the room name...
more »

2017-04-14 15:04 (2) Answers

How do I display my Products in Separate pages?

So I have a ASP.NET MVC 5 Based shopping cart project and one of the requirements is to show 8 products per page. I have 21 products in total. This is how I'm showing them at the moment: public ActionResult Index() { String SQL = "SELE...
more »

2017-04-14 09:04 (2) Answers

Is inversion of control implemented in Django?

I come for .net background i used to work with asp.net MVC that implements the dependency injection through the container ( UnityContainer) that does the mappings between the interfaces and their implementation . Now am working with django i wonder i...
more »

2017-04-13 14:04 (0) Answers

OutputCache doesn't work

I want to cache return data from an action. I use the OutPutCacheAttribute for this purpose. Here is my client code: $(document).ready(function() { $.get('@Url.Action("GetMenu", "Home")', null, function(data) { parseMenu(dat...
more »

2017-04-13 14:04 (3) Answers

FormData append item in array

public List<Region> Regions { get; set; } in model called News.An Region Model is public class Region { public int Id { get; set; } public string Name { get; set; } public static Region Parse(DataRow row) ...
more »

2017-04-13 09:04 (2) Answers