Home > Net >  Some of the problems about the database table calculation
Some of the problems about the database table calculation

Time:12-24

I previously developed a project, because the database table some of the field is obtained by computing, is a former directly through the SQL statements in there,
Such as "update A SET a1=((* @ @ H1 H2)/@ H3) * a2/100 WHERE aID=aID AND gID=@ gsid" of these variables is taken by the SQL statement to other tables,
Calculated directly by executing SQL statements, now exposed to linq expression, found as if can't meet my needs, now want to consult everybody a great god, like I need calculate the fields in the table, isn't there a better way,

CodePudding user response:

How do linq query engine, involving what the update?

CodePudding user response:

It is as you say, you use the data update syntax of DAL framework?

You need to update the data according to the requirements of your framework, and then submit to the database,

This with linq have no direct relationship, from a variety of other table in nature can be the use of linq provider to do this, but with less than the query inside to write what modification statements of the problem,

CodePudding user response:

refer to the second floor sp1234 response:
it is as you say, you use the data update syntax of DAL framework?

You need to update the data according to the requirements of your framework, and then submit to the database,

With linq no direct relationship, and from a variety of other table in nature can be the use of linq provider to do this, but with less than the query inside what to write modified statement,


To ask, my idea is to use linq to collect data from a database using a container storage, the related calculation and then deposited in the database, this line of thought, right? And then there is not clear what to use easy

CodePudding user response:

Thought there is no problem

CodePudding user response:

Linq can also update the insert

CodePudding user response:

The linq can be regarded as a tool to a database object oriented

CodePudding user response:

Object, the watch is recorded is object, directly to the table and record the instantiation, then curl
  •  Tags:  
  • LINQ
  • Related