Forum Xamarin.Android

Azure InsertAsync DateTime to SQL.Date on Xamarin Android

SchinwinkwinskySchinwinkwinsky BRMember ✭✭
edited October 2016 in Xamarin.Android
public class User
    private string id;
    private string nick;
    private string password;
    private DateTime birthday;

    public Id { get; set; }

    [JsonProperty(PropertyName = "nick")]
    public Nick { get; set; }

    [JsonProperty(PropertyName = "password")]
    public Password { get; set; }

    [JsonProperty(PropertyName = "birthday")]
    public Birthday { get; set; }

On Azure table all the columns are of type nvarchar, but birthday is of type date. Note that the type of birthday in C# is DateTime and on table is SQL.Date. When I use the method InsertAsync( ) I get a exception. How can I do a good insertion?

Sign In or Register to comment.