LINQ using NOT IN
How to create LINQ query fro the following SQLSelect * FROM [DEV].[tss].[MERCHANT] Where ParentID IS NULL OR ParentID NOT IN (Select distinct MerchantID FROM [DEV].[tss].[MERCHANT]) var mm =...
View ArticleDbExpressionBinding requires an input expression with a collection ResultType...
Here is my query : public ActionResult ClosedOrdersDetails(string id, string OrdreNo) { OrdreDetails_VM odvm = new OrdreDetails_VM(); var col2 = (from sih in data.Sales_Invoice_Header join ve in...
View ArticleCalling SSIS package using C# code
I am calling SSIS package using c# code by using below dll...
View ArticleEntity framework is not recognizing concurrency [concurrencyCheck] attribute...
I have an older website (written in web forms in VB and ADO) that I would like to re-write with MVC core in C# and entity framework. I have the app working and it pulls data from the existing database...
View ArticleEF6 error 3013 - missing table mapping / problem mapping fragments (0 to 0 or 1)
Table Owners PK ownerId&Table QbOwners FK ownerId with a unique index on ownerIdThink I have a 1 to 0 or 1 relationship which SSMS shows as many to many.Updating the model from db gives me an...
View ArticleNew MSOLEDB Driver and time retrieval
Hi guys,In order to support TLS 1.2 we have upgraded the OLE DB driver however dates are now retrieved in a different format than the previous driver. Is there a way to specify this somewhere?...
View ArticleExport data from database to an existing excel sheet using ASP.NET
I have an Template Folder in which i have an Excel Sheet. I want to extract data from database and export it to Excel Sheet. Every time i click Export a copy of the Excel sheet in Template folder...
View ArticleDatabase first approach with DI plugin
Dear All,I have seen many project those using Code first and using DI with Autofac IoC . My point is im upgrading or rewritten my monolithic application to new pattern like DI , IoC and plugin so study...
View ArticleI need linq query for report using mvc5 c#
I need below result in linq query using mvc5DateNewRegistrationCumulativeRegistrationNewApplicationCumulativeApplication09-02-2018131209-01-20182211I am using below two tables Registration and...
View ArticleBest way to migrate data to new db?
Hi, I have an data that I need to migrate into a new database. The two databases have a slightly different structure(table relationships, some properties have been removied some added).I'm at a loss to...
View Articlesaving/Comparing Date from C# to Sql
when date as String and pass it to StoredProcedure. Convert.ToDateTime(model.ToDate, cultureinfo).ToString("yyyy-MM-dd HH:mm:ss.fff")where ToDate is string in Code and DateTime in SPFor...
View ArticleCounts of two table base on dates using linq
I have two tables Registers and IAApplications as belowRegistersNameEmailCreationdateMazharKhan@gmail.com 2018-09-0213:08:32.303 mohan m@gmail.com 2018-09-0113:08:32.303 kjdj k@gmail.com...
View ArticleLinq with "not in" and "Count" query
I want a query like select count(*) from Table1 where Id not in (Select Id from Table2) select count(*) from Table1 where Id in (Select Id from Table2)These in Linq .I have checked with Contains but i...
View ArticleIDisposable Interface
Hi,I am using entity framework in my application and i know one of making sure the context is disposed is by using @using(). I don't want to use above method but instead inherit the class from...
View ArticleBulk Insert
Hi I am using below code to BukInsert data from Excel to Sql . I want to add Record No by autoincrementing . Is it possible . I dont want to createIdentity fieldSqlBulkCopy objbulkInsert = new...
View ArticleUsing Code First for database that already has database first approach used...
Hi, I am new to the "code first" approach as i have been using database first untill now. I have been working on a project with a couple of my friends using .net MVC. We have all been using database...
View ArticleProviderManifestToken="2012.Azure"?
I have a EntityFramework service in a Azure cloud service space accessing aAzure SQL serve. Reading the EDMX for the service, it states that its "ProviderManifestToken="2012.Azure"". When I try to...
View ArticleHOW TO SELECT only 20 words from a column using LINQ
I guys,I've got a column which can contain more than 20 words but I would like to select only 10 or 20 words to be displayed on the web interface.Can someone help me?
View ArticleThere is already an open DataReader associated with this Command which must...
I have this unexplained error coming from my WebService.asmx.20180915.01:02:21 UTC : QBWebConnector.SOAPWebService.do_sendRequestXML() : QBWC1041: SendRequestXML failed.In the SendRequestXML method a...
View Article