实体框架不更新位值 [英] Entity framework doesn't update the bit value

查看:45
本文介绍了实体框架不更新位值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我对实体框架有一个奇怪的问题,在我的项目中使用EF 6 codefirst和我的数据库使用sqlserver 2012


与表iam一样,使用类型为bit的isactive列,仅代表0或1。默认情况下,我将此列值保持为1,表示为真。


当我们要从表中删除记录时,我们应该使1到0,但实体框架不会t更新价值。


任何一个有这个奇怪问题的人都有解决方案吗?



<问候 


BosH

解决方案

可以在这里发布您的代码并帮助人们这里是为了帮助你。


你可以从数据库更新EF并看到它仍在发生。


你实际上可以在这里发表你的问题:


https:// social。 msdn.microsoft.com/Forums/en-US/home?forum=adodotnetentityframework&filter=alltypes&sort=lastpostdesc


chanmm


Hi everyone,

I have a strange problem with entity framework, In my project im using EF 6 codefirst and for my database im using sqlserver 2012

as with a table iam using isactive column of type bit, which represents 0 or 1 only. and defaultly i kept this column value as 1 which is represents true.

When we want to delete a record from the table we should have to make 1 to 0, but the entity framework doesn't updating the value.

is any one having this strange problem any 1 with solution here ??

Regards 

BosH

解决方案

May be post your code here with help the people here to help you.

You can update the EF from Database and see it is still happening.

You actually can post your question here:

https://social.msdn.microsoft.com/Forums/en-US/home?forum=adodotnetentityframework&filter=alltypes&sort=lastpostdesc

chanmm


这篇关于实体框架不更新位值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆