Issue with a EF Model having a property that is also a Model
Hello,I have an EF Model, lets call it Model 1, in C# that has 4 columns, CreatedBy, CreatedByDate,ModifiedBy,ModifiedByDate,this model has a property that is a different model that has the same 4...
View ArticleAuthentication
I was just wondering if I could get some help on understanding what this block of code does, specifically : IdentityDbContext<ApplicationUser>Ā . Thanks !Ā publicclassApplicationDbContext :...
View ArticleHow to join 2 IQuerables
I have 2 queries which have same table joins but different where conditions. I need to compare the result of these 2 queries. Instead of saying .ToList() on each query and getting the result into...
View ArticleUpdating model from database throws an exception
Hi,I've recently updated Visual Studio to version 15.7.1Now, when trying to update modelĀ I get this messageOutput window:Unable to generate the model because of the following exception:...
View ArticleTPC: prevent creation of abstract class tables.
I'm trying to implement a code-first scenario where Abstract Base classes are used ONLY for defining the table-modelsĀ the point is to define similar properties ONCE and then let the inheritance work...
View ArticleRemove Columns from Datatable
Hi, I want to export the results of a database query to a csv file which works fine but I also need to remove certain columns from the Datatable before the csv file is exported.Ā Which columns that get...
View ArticleInsert query not working in a loop
Ok.. here is the problem.. I have a loop which loops for ten times. For each iteration an insert query is executed. This insert query has 5 column values whose value is again a query itself i.e sub...
View ArticleHow to copy data from one table to another?
I've two table "main" & "temporary" with the same fields. I want to copy the "temporary" table data to the "main" table & I'm using the entity framework. Is there any way to do that without...
View ArticleExcel --> MVC
Hello,I'm trying to create new website MVC with Owin/Identity and control all records from Excel. But I can't find any useful information how to do it. Maybe someone can guide me a bit? or show any...
View ArticleExporting search result to excel sheet in mvc application.
I have a web application and multiple search options. I need to export the result in excel sheet. I tried storing the result in session and export it to excel, it works fine with small database, but...
View ArticleAzure SQL and DTUs
Hi all,Reasonably easy question. I don't understand the DTU concept that is attached to the Azure SQL database.Is DTU more like petrol tank on a car where you have certain amount and if you use it you...
View ArticleStored Procedure expects parameter --- which was not supplied.
I get a : "Procedure or function 'sp_mysp' expects parameter '@LastNameT6e', which was not supplied" at execution ; I have assigned all my ado.net correctly it seems , as these same object identifiers...
View ArticleCall a stored procedure from webapi method using EF in .Net Core application ---
Hi, In my .Net Core based web application I am accessing and using a MSSQL database. Through entity framework. Initially there were only tables. I have now written a stored procedure and am looking for...
View ArticleASP.NET Application - Insert Row in Azure SQL database
<div class="post-text" itemprop="text">I am trying to insert a row in the Azure table and the getting an errorĀ Cannot POST '/tables/Sate_Customer\nI am successfully able to insert in 'Customer'...
View ArticleAsNoTracking in linq and ef
<div class="votecell post-layout--left"> <div class="vote">0 down vote favorite<div class="favoritecount"></div> </div> </div> <div class="postcell...
View Articlehelp me please why error in Red
Imports System.Data.SqlClientPublic Class delicious Inherits System.Web.UI.Page Dim conn As New SqlConnection(" Data...
View ArticleC# Question: LINQ Select statement all records ....
I have a LINQ SELECT statement Question: I need to Select from TableA with 2 where clauses, Order by and get the count of Number of records returned. Goal: one statement that select 2 fields from the...
View ArticleCreating a search function with relavence
HiI am trying to build a search facility and have a basic idea on sort of maybe not, but how do i go about my sorting by relavence?I know I have to give a weight to the certain search parameters?
View ArticleDo i need more than one set of records?
HiLet say I have an ecommerce site, and as part of that I need CRUD operation, a quality search faciltiy, and a way to review how the site works, what customers are doing etc.So do i need different...
View ArticleSQL Network Interfaces, error 26
Last night I applied patches to my SQL 2012R2 server.Updates .Net Framework to 4.7 and a new version of Symantec Endpoint Protection 14Today I get SQL Network Interfaces, error 26 when trying to open a...
View Article