Database objects are not in my Entity
Hi All,I started using Entity framework with web forms. For that I have created an entity. My entity's name is MIS.Below is my .edmx diagrame.The problem is neither I am able to access my namespace nor...
View ArticleWhat LINQ and LINQ syntax is this tutorial?
Hi, sorry I am new to LINQ. May I know which LINQ type and syntax is this tutorial? I will wanna to study more on that type of LINQ first so that I can understand the tutorial better....
View ArticleHow to manually define DBContext code snippet for table without primary keys?
Hello,I followed these instructions ( https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db ) to automatically create database models/entity classes and the DBContext class,...
View ArticleEntity Framework - Change database name
Hi, I tried the tutorial here - https://docs.microsoft.com/en-us/aspnet/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/After I change my database name, example...
View ArticleLINQ filter by month and year
Hi, I am new to LINQ.I managed to run some LINQ succesfully for CRUD.Here is an extract of my code: var payroll = from pm in dc.Payroll_Masters from pd in dc.Payroll_Details //where pm.Salary_date...
View ArticleJoin on a GroupJoin
Hi there,So I need to set a Join on an GroupJoin. I have googled a lot to find the answer on my problem, but i cannot find it. In the database i have templates. I select a template with a table joined...
View ArticleEntity Framework is not re-creating back my tables after namespace name changed
Hi, I have changed all my namespace using few ways including "FIND and REPLACE" all.But after I did that, I realize that my code is not re-creating back all the tables initialized by my models class....
View ArticleObtain next primary key value (for bigint/int) for SQL table in MVC app?
So I'm working on an MVC app and need to figure out how (using C# code within my controller class) to obtain the next available primary key for a table?In my table, I have a primary key field setup, as...
View ArticleEntity Framework - Code First Approach issues?
Hi,After studying, I realize there are Code First, Model First or Database First approach. Many recommended Code First approach which I have tried as well.Issue is what if my application released to...
View ArticleDML operation using EntityClient with Entity-Sql
I haven't get proper documentation on EntityClient with EntitySql. Why?https://msdn.microsoft.com/en-us/library/bb738573.aspx#Anchor_13 after reading from this link, what is the use of entity-sql?Is...
View ArticleUpdate object in database using Entity Framwork Mvc asp.net - trying with...
<p>Hello, </p><p>I have a problem when I am trying to update Supplier in database. </p><p>My database consist of four tables: Supplier, Town, Street and...
View ArticleOne or more validation errors were detected during model generation:
hI, i got this error after I change my model class name from "Product" to "Bill".One or more validation errors were detected during model generation: WingtipToys.Models.Bill: : EntityType 'Bill' has no...
View ArticleViewCoponent Not Working ...Spinning Errors on Class
I have adapted a couple of examples and think this is more or less correct, but I am getting errors in odd places. Clearly I have stuffed something up.The view component:using Eva804.Data; using...
View ArticleHmmm Broken It...Unable to resolve service for type 'EVA804.Data.EVAContext'...
Uhmmm I am confused what I did to make this happen.startup.cs:using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using...
View ArticleLinq question
i have thisvar projectsList = BL<IProjectSupervisorBl>.GenericBL.GetProjectsIdsByCoreUserId(UserLogged.Id).ToList();and i have a var dataTasks with the projectId ammong other propertiesi nedd to...
View ArticleLINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.
I am stuck on a LINQ issue. I am getting the following error:The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.This is my where it is failing:FeeAuth_STRMDetail.STRM =...
View Articlecalling a stored procedure using entity relationship
Hi All,I created a stored procedure that accepts three parameters and it also has some dynamic query in it too. How can I call this stored procedure in my asp.net application using entity...
View Articleusing ToString() in Lambda
Hi,Is there a way to use ToString() in Lambda. Query List<PostViewShoppingCart> scartList = (from s in MongoContext.ShoppingCart.AsQueryable() join p in MongoContext.Products.AsQueryable() on...
View ArticleERROR [42000] [SQL Anywhere]Wrong number of parameters to function
Hello.I'm getting an exception with ODBC error [42000] with a Stored Procedure. The real problem is that I have tried everything is in my knowledge to solve it, but it's still showing the unhandled...
View Article