public void HandleMetaPost([FromBody] Meta metaInJSON) { using (ElevationDataContext context = new ElevationDataContext()) { context.Meta.Add(metaInJSON); context.SaveChanges(); return; } }
public void HandleDataPost([FromBody] DbControls dataInJSON) { using (ElevationDataContext context = new ElevationDataContext()) { Data dataContext = new Data(); dataContext.MapId = dataInJSON.MapId; dataContext.MapData = dataInJSON.BinaryString(); context.Data.Add(dataContext); context.SaveChanges(); return; } }