Skip to content

Feature Request - Allow visual studio c# interactive to connect to an existing db #436

@Razkan

Description

@Razkan

Summary

As of visual studio version 15.8, support for 64-bit C# interactive has been added. This means that starcounter dll's can be loaded to the interactive, making it a mean to load project and to CRUD an active database during runtime with plain C# code, while for example debugging.

Proposal

Allow for the Db or Db.Enviroment to be set through the interactive.

Db.Connect("Default");
Db.Enviroment.Set("Default");

Examples Usage

> #r "C:\Program Files\Starcounter\Starcounter.dll"
> using Starcounter;
> Db.Environment.Set("Default");
> var user = Db.SQL<User>("SELECT u FROM Db.Users u WHERE u.name =?", name).FirstOrDefault();
> Db.Transact(() => user?.Delete());

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions