You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the following code, i have 2 different behaviours when the column's type is bit or tiny(1).
varitems=newList<ConsoleApp1.BooleanBulkInsertDbContext.TestClass>(){new(){Name="Is active is true",IsActive=true,},new(){Name="Is active is false",IsActive=false,}};DbContextcontext= GetDbContext();
context.BulkInsert(items);
When the column's type is tinyint(1), the inserted result is :
When the column's type is bit, the inserted result is :
The text was updated successfully, but these errors were encountered:
public class DailyOption
{
public int DailyOptionId { get; set; }
public DateOnly Time { get; set; }
public bool IsCall { get; set; }
}
Database Table:
CREATE TABLE `DailyOption` (
`DailyOptionId` int NOT NULL AUTO_INCREMENT,
`Time` date NOT NULL,
`IsCall` bit(1) NOT NULL,
PRIMARY KEY (`DailyOptionId`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
Hi,
With the following code, i have 2 different behaviours when the column's type is bit or tiny(1).
When the column's type is tinyint(1), the inserted result is :
When the column's type is bit, the inserted result is :
The text was updated successfully, but these errors were encountered: