c# - 无法转换为不受支持的类型“DateTimeOffset”DataServiceContext
问题描述
我正在尝试使用此处DataServiceContext
显示的方式更新远程表
在其他表上,这种方法对我来说效果很好,但现在我收到了这个错误:
无法转换为不受支持的类型“DateTimeOffset”
这是我的代码:
decimal hungerPercent = selectedWeight / (selectedDailyPercent * selectedPortionHeads * _batchWeight); //some calculation
var DeliveryGroup = _container.DeliveryGroups
.Where(x => x.GroupCode == selectedGroupCode && x.Branch == branch).First();
DeliveryGroup.HungerPercent = hungerPercent;
_container.UpdateObject(DeliveryGroup);
_container.SaveChanges();
解决方案
推荐阅读
- kubernetes - 内省 Docker/Kubernetes Runtime 以检查它是 Docker 容器还是 Kubernetes 集群中 POD 内的容器
- python - BeautifulSoup4 - findAll 只出现 10 次
- node.js - 未创建索引,$text 查询需要文本索引 - mongoose
- python - 拦截对象创建
- database - Wordpress 搜索结果不显示来自外部来源的图像?
- ios - 从 UITabBarController 调用 SwiftUI 视图
- functional-programming - 如何在 Dhall 中编写处理联合类型的函数
- api - 使用改造 Kotlin 的 JSON 对象
- filter - 年最小值出现
- javascript - 密码不允许 nodejs + mongo db