Execute Sql Async with ToList
protected virtual async Task<IEnumerable<T>> ExecuteAPI_SQLQuery_ObjectListAsync<T>(DB_ID db_id, string sqlQuery, object queryParameters){ try { string dbString =...
View ArticleConverting dataset to list incorrect type
I am trying to convert a dataset into a list but for some reason its failing when a datarow column is null when going in a type of double.. It appears to be this line that is giving me trouble any...
View Articlecan not open database
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code....
View ArticleLINQ : Contains not checking properly in the entire sentence of a column
Hi,I am checking and returning boolean value. But, it is returning always false.MyInParameter : "APPLE"My table Column Col1ORANGE/APPLE A_B/BANANAAPPLE A_C/ORANGE/GUAVAORANGE/BANANAORANGE/APPLE...
View ArticleHelp about linq
Good Day to all master of asp.net MVC,what problem with my code always same the 'EXPENSE' and 'BALANCE'but diffrenet departmentid see my screenshot and code belowhttp://imgur.com/a/Bg8Echere is my code...
View Articleincrementing an ID column
Whenever I'm adding a new object from the front end, the id = 0. In the WebApi layer, I'm trying to find the max ID that exists in the list of events and then assign the next ID to the new objects....
View ArticleFunction import in dynamic store procedure
I have a store procedure with dynamic query. I am passing the column name in a variable and getting the result. Here is the store procedure.ALTER PROCEDURE [dbo].[prosperGetSampleResults] @TestId...
View ArticleDataGridView Cell - How to set Watermark text in Datagridview cell in C#...
Hi,I am using window application. I want to use some cell in the columns as watermark text.What is the syntax for that and how can we set this function in Win App c#.My code : if ((dtGrid1[1,cnt].Value...
View ArticleLINQ : contains not checking with null values.
Hi,I want to check some word which contains some + symbols. when i write the below query it should return true.but, i am getting object reference error.Also my condition is should check null value in...
View ArticleHow to implement a specific repository pattern
i got only interface code for repository pattern. see the interface and tell me how could i implement it by a class because i could not visualize how to write method body of all interface function when...
View ArticleOn INSERT call Trigger
I have a table and need to create a Trigger for each time a record is Inserted into my ABCDoc table. Goal: On INSERT create a Trigger, how to make that happen?
View ArticleEF and map store procedure
i just read this article http://www.c-sharpcorner.com/UploadFile/ff2f08/call-store-procedure-from-entity-framework/they show how they add store procedure to EFi though when we select store procedure by...
View ArticleHow to work with existing and non existing tables with Entity code first
just reading a article on EF from this url https://www.codeproject.com/Tips/661053/Entity-Framework-Code-First-Mapnormally EF code first create table when we migrate but say when we are working with...
View ArticleAfter EF update/save whole app slows down (20x). 8-20s wait time at clr.dll...
I have mysterious slow down of my web application.I have discovered it on a View that is using many Ajax Json calls to MVC Controller to populate charts/table.Everything works great after new worker is...
View ArticleThe property 'User_Id' is part of the object's key information and cannot be...
I am trying to replace a user ID in a SQL Table column with another user ID but getting the Error "The property 'User_Id' is part of the object's key information and cannot be modified. " Below is my...
View ArticleGain knowledge about Entity framework
Hi All,I need to learn entity framework from scratch. i have learned from websites but i m not satisfied even i couldn't clear the interview.kindly suggest me to gain deep knowledge in Entity framework...
View ArticlePassing Null values in to stored procedure in Entity Framework
Hi I hope someone can help with this. I am trying to execute a stored procedure which has four parameters, all of which are null by default. I'm pretty new with Entity framework and found this very...
View ArticleLinq Where clause timeout
I have two lists having large number of records for e.g. 300k in each listList<string> list1,List<string> list2i am trying to compare two lists and find the items which are in list1 but not...
View ArticleHow many to many relation can be established without 3rd table in EF
just i saw this post https://stackoverflow.com/a/16367951one set of...
View ArticleHow to specify multiple data with EF contains function
suppose i am checking user has any one of role or not. suppose all roles are stored in variable separated in commavar roles ="'HR','Admin','Account'" etcnow how could i detect that a specific user has...
View Article