ASC订购的正确语法是什么?
错误1当前上下文中不存在名称"ASC"
public IEnumerable<DTO> GetGrid(String ShipNumber)
{
try
{
ORepository rep = new ORepository();
var query = rep.GetAll()
.Where(x => x.SHIP == ShipNumber)
.Orderby (x.City ASC)
.Select(g => new DTO
{
CUSTOMER_NAME = g.CUSTOMER_NAME,
CITY = g.CITY,
SHIP = g.SHIP,
});
return query;
Run Code Online (Sandbox Code Playgroud) Error 3031: Problem in mapping fragments starting at line 439:Non-nullable column D_LINK.CARTON_QTY in table D_LINK is mapped to a nullable entity property.
Run Code Online (Sandbox Code Playgroud)
我有D_LINK一个列的视图
CARTON_QTY(int, not null)
Run Code Online (Sandbox Code Playgroud)
我不明白我的问题在哪里,我必须使它为null \如何?
我必须有语法问题,但我无法理解这意味着什么 - 我用Google搜索,但我不明白这个问题的原因.请告诉我函数语法有什么问题
这是错误的行:
else sequence= (Bnum < Anum) ? sequence=Bnum : sequence=Anum;
Run Code Online (Sandbox Code Playgroud)
这是功能
int reduction(int Knum)
{
int sequence=8, Anum=0, Bnum=0;
printf("enter a sequence,to stop print (-1)\n");
while(sequence!=-1)
{
Anum = sequence;
scanf("%d",&sequence);
Bnum = sequence;
if (Anum+Bnum<8)
return 1;
else
sequence= (Bnum < Anum) ? sequence=Bnum : sequence=Anum;
}
return 0;
}
Run Code Online (Sandbox Code Playgroud) 我刚刚上传了一个新版本的代码到我的服务器并得到了这个错误,我无法理解,也不知道如何解决 - 我没有更改datetime2 - 我的代码语法中甚至没有这个词.你知道那是什么意思吗?
执行命令定义时发生错误.有关详细信息,请参阅内部异常
InnerException:System.ArgumentException:正在使用的SQL Server版本不支持数据类型"datetime2".
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC [] rpcArray,Int32 timeout,Boolean inSchema,SqlNotificationRequest notificationRequest,TdsParserStateObject stateObj,Boolean isCommandProc)
在System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,Boolean async)
在System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String method,DbAsyncResult result)
在System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,RunBehavior runBehavior,Boolean returnStream,String method)
在System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior,String method)
在System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior行为)
在System.Data.Common.DbCommand.ExecuteReader(CommandBehavior行为)
在System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand,CommandBehavior behavior)
sql entity-framework entity-framework-4 entity-framework-4.1