-1

I try to update the database to make tables related to Identity, and I'm using Microsoft.AspNetCore.Identity, autogenerated public class IdentityUser, when I write the command, I recieve this error: Column, parameter, or variable #14: Cannot find data type datetimeoffset.

I'm using MVC .net 5 and SQL Management Studio 19

3
  • please show your code with text Commented Jun 19, 2023 at 19:09
  • from the migration file: ' LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),' here is the problem Commented Jun 19, 2023 at 19:20
  • Data Type DateTimeOffset is not supported. You must use datetime,LockoutEnd = table.Column<datetime>(type: "datetime", nullable: true), Commented Jun 19, 2023 at 19:27

1 Answer 1

0

You can just use datetime instead of datetimeoffset.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.