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
You might get more success posting on the driver's issues page:
https://github.com/madd0/AzureStorageDriver/issues
I did and he pointed me to the right direction:
Turned out, I did not use the AzureStorageDriver but the default, built in SQL driver.
But then my question would be fitting here again. What's the trick?