Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Browsing all 1698 articles
Browse latest View live

DateTime - Previous Day Issue for specific regions

My SPA application is based out of Knockout as front end and ASP.Net Web API with EF as backend. Seems everything works fine until if someone changes submits date from India region. Though front end is...

View Article


Save file details in my SQL database

I need to save details of a file from shared folder in my SQL DB. I have created a Model as: public partial class RsbfileDetail { public string FileUrl { get; set; } public string Filename { get; set;...

View Article


not able to retrieve values from SQL DB

I am trying to get values from my DB but I am unable to do so. I have created A model, context, A table is in SQL server and then started coding. My context is:  public partial class rsbsrdbContext :...

View Article

How to get perfect Result within same table and result without duplicate...

Dear all expert,I am a new  LINQ trainer and  trying to join 1 table in a query with Linq to get data from all combine 3 tables but unlucky getting a unique result on MVC web  . I getting mistake in...

View Article

Is it possible to define that property should be ignored when insert/read?...

I have a principal entity: public class Predmeti { public long PredmetId { get; set; } //... public int EntityTypeId { get { return (int)EntityTypesEnum.pravno_Predmeti; } set { } } public virtual...

View Article


how to convert raw sql subquery to linq query

i have this query and i am unable to convert it to an equivalent linq queryselect distinct u.Name,p.PName,u.AccCreateDate,up.BuyDate,u.ID from Users u inner join UserPackages up on up.U_ID=u.ID inner...

View Article

Need my EF core to see already existing primary key in my SQL server table...

I have a SQL server DB table namely "RSBFileDetails", which has a primary key column "[File_Reference_Id]" auto generated int type. When I run my code to enter values in my DB using EF, I get an error:...

View Article

SQL error when trying to save a record.

I have to check and save details of file(s) from a folder into a SQL server database. I am trying to do it but have some runtime error. Below is the code:public async void PostValuesIntoDB() {...

View Article


EF does not recognize my SQL server table's Primary key.

I have a Model which has code:  public partial class RsbfileDetail { public string FileUrl { get; set; } public string Filename { get; set; } public string CaseId { get; set; } public string FileType {...

View Article


Passing parameters to query

HI. I am trying to use offset in sql query, which is to be called from a C# console application.Query which I want to make the offset value as parameterized :  SELECT COL_A, COL_B from tablename ORDER...

View Article

issue with EF

I am facing below issue while working EF 6  , its creating duplicate table for many to many relationship ,any  urgent help is highly appreciatedOne or more validation errors were detected during model...

View Article

EF 6 and many to many relationship

i m working on EF 6 (mapping with many to many relationship) ,seehttps://www.codeproject.com/Articles/234606/Creating-a-Many-To-Many-Mapping-Using-Code-Firstwhere it created "PersonCourses"  as middle...

View Article

SQL Dapper UNION extension method.

Hi All,I have using Dapper for fetching data from SQL server, recently I have a new requirement to build UNION query to get the result.I have seen the Dapper package there is no UNION extension method...

View Article


EF for cross reference tables?

I'm new to EF and Linq and wondering what's the best and simplest way to query 3 relational tables with one being a many-to-many.  Say I have the following Tables:Roles (Role_CID, Role) 2. Users...

View Article

EF core and Visual studio 2019 error

I am facing below errorSecurity Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compatibility only. The recommended protocol version is TLS 1.2 and later.

View Article


Dynamically change table schema in entity framework not working

Dear Support Team,I am running one asp.net project where i used entityframework 6 Database first approach.I am using this context to just fetch the records from table.Now i have some requirement here:I...

View Article

Razor View MVC - Cannot applying indexing with [] to an expression of type...

Dear all,I have the following class which needs to display questions to the user based on test id. Next, i am stuck for LOOP part that how to assign "i" inside model in view model part  and prompt...

View Article


VS 2019 and EF core Core with ,net standard

i m facing below error ,can any share me how to address this ??Severity    Code    Description    Project    File    Line    Suppression StateError    MSB3644    The reference assemblies for...

View Article

Error from while creating code first

<div class="post-message " data-role="message" dir="auto"> <div>i am getting the following error  when creating the design model from code first..Can any one please helpProject...

View Article

Join two tables and sum a certain colum with linq to sql c#

GreetingsI want to get 0 if sum result is null using Linq toSQL and C#.Can anyone please help with this query?internal decimal GetItemPurchasedByDate(linqToSqlDataContext db, int itemId, DateTime...

View Article
Browsing all 1698 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>