Home

AzureStorageDriver

Hi,

when using the https://github.com/madd0/AzureStorageDriver/ with StorageEmulator I do not get inserts working.
TableRows taken from the treeview is working fine when reading but did not get it to write.

Tried with DataContext, no success, a lot more but may be I dig completely wrong?

void Main()
{
    var row = new Powerflow();
    TableRows.Take(10).Dump();             //works fine!**
    TableRows.InsertOnSubmit(row);     //error1
    DataContext dataContext = this;
    Table<Powerflow> books = dataContext.GetTable<Powerflow>();   //error2
    books.InsertOnSubmit(row);
}


public class Powerflow : TableRow
{
    public string Battery_Mode { get; set; }
    public int E_Day { get; set; }
    public int P { get; set; }
}

error1:
NullRefException at System.Data.Linq.Table`1.InsertOnSubmit(TEntity entity)

error2:
InvalidOperationException•••The type 'UserQuery+Powerflow' is not mapped as a Table.

Comments

Sign In or Register to comment.