0

I am using AspNetIdentity and I have a non primary key column that is an identity auto increment.

[TableName("AspNetUsers")]
[PrimaryKey("Id", autoIncrement = false)]
public class Coach
{
    public string Id { get; set; }
    public string Email { get; set; }
    public string UserName { get; set; }
    public bool Active { get; set; }
    public bool Admin { get; set; }
    public int CoachId { get; set; }
}

How can I change my class definition to set CoachId to autoIncrement is false without it being the primary key? I'm using db.Save to save the object.

CGross
  • 493
  • 1
  • 7
  • 18

1 Answers1

0

I just ended up executing a query!

 var query = String.Format("UPDATE AspNetUsers SET Active = '{0}' WHERE Id='{1}'",activeStatus,id);
CGross
  • 493
  • 1
  • 7
  • 18