Table Adapter
Hi Friends,On my Table Adapter Class I have a Function Method that takes a table and a Parameter. For some reason I don't see my parameter in the intellesense. or I have a red squiggly line under it...
View Articlehow to get the max value from the linq statement, Please help
Hihow can I make the following linq statement to get maximum value of reading for the year and month and depot, Any help would be very appreciatedpublic long GetMaxMeterReading(int depotno, int year,...
View Articlegetting array of ID fields in many to many relationship in Entity framework
Hi,I have in the database table Deal having DealId and table Product having ProductId. I have table ProductDeal having ProductId and DealId for the many to many relation between the tables product and...
View ArticleLoad Data Fast
Hi, I have a table in database which is contains more than 8000+ Rows and 8 columns So when i Retrieve it into my asp.net core project it will take almost 40 seconds to load into View. but this same...
View ArticleTableAdapter
Below is the code thats giving me an error Dim adapter As New DataSetTableAdapters.SentEmailTableAdapter Dim table As New DataSet.SentEmailDataTable adapter.GetDataByDate(table, batchflag, startdate,...
View ArticleEF trying to select a column that doesn't exist (Oracle database)
Hello all,I'm currently stumped by a strange EF Core + Oracle problem. When I include one of my tables, it's trying to select a column that doesn't exist (there's no column in the table, no properties...
View ArticleLinq - how to add case when?
Hi,I have this query below;select count(status) AS 'NUMBER OF TIMES', CASE WHEN status = 0 THEN 'UNCERTAIN' WHEN status = 1 THEN 'CONFIRM' ELSE 'CANCEL' END AS STATUS from GameConfirmResponses group by...
View ArticleHow Do I Select Fields from a Nested ICollection?
First, I am new to LINQ and Entities Framework, so I am still learning the syntax and how the relationships work. Surprisingly LINQ is nothing like SQL as people claim. Anyway I need to know how to...
View Articlesearching by multiple values....
Hi,I'm trying to see what the best query would be to do a search in a table. The table is as follows:ID, title, startDate, endDateUser adds in multiple searches so there might be records like the...
View ArticleHow to resolve the error 'System.Int32' type to the 'System.String' type is...
HiI have an error 'System.Int32' type to the 'System.String' type is not valid in mvc api .Pls advice meThank you MaideenIt is my codeusing System; using System.Collections.Generic; using System.Linq;...
View ArticleGet distinct list of foreign keys with Linq
HiI have classes: public class Deal { public int DealId { get; set; } public string Title { get; set; } public Dealproduct[] DealProducts { get; set; } } public class Dealproduct { public int ProductId...
View ArticleLinq difficulties getting single column distinct values
Table Profile holds several columns, I am only interested in the distinct values of the column regIpLinq below gives me all columns.How can I narrow this down to just a list of distinct regIp?var...
View ArticleSequence contains no elements
Though the underlying the view has multiple records, the statement CurrentContext.All<Resource>() is always empty which was working previously. Not sure what is missing. Getting error message...
View ArticleLinq minimal value of integer in object
HiI have class Device and it has Price. How do I get the minimal price from all devices? here is the Class public class Device { public int ProductID { get; set; } public string ProductTitle { get;...
View ArticleDbContext.SaveChanges() call limitations
Hello guys!Are there any DB operations count limitations on when do I call SaveChanges()?Thank you for your assistance.
View ArticleGetting deadlock with Task async/await
First off, I'm a total newbie when it comes to Web APIs. This is actually my first attempt. I'm beginner-intermediate when it comes to Winforms.That being said, I've created a Web API (ASP.NET Web...
View ArticleCreate table on runtime
Hi Is it possible create table and it schema at runtime ? use Entityframework Corefor example, click a button, the backend code detect today's date and create a table named 20191209 and it schema
View ArticleEntity Framework 6.3 Slow Startup
I have a project in ASP.NET (no ASP.NET Core, no ASP.NET MVC) based on .NET Framework 4.5 and now upgraded at Entity Framework 6.3.I noticed that the startup time is over 1 minute.The project have...
View ArticleCalling store procedure using ado.net taking more time than SSMS
My store procedure has dynamic sql which return data. when i am calling the SP from SSMS then it is taking 4 sec but when i am calling the same store procedure from same machine by ado.net classes....
View ArticleSqlDataReader not throwing an exception
I have method public static SqlDataReader ExecuteReader(SqlCommand cmd, int level = 0){SqlConnection conn = cmd.Connection;SqlDataReader dr = null;cmd.CommandTimeout = SqlConnectionTimeOut;DateTime...
View Article