public async Task DeleteInterface(RegisteredInterface deviceInterface) { using (var uow = new UnitOfWork <RegisteredInterface, RomiDbContext>()) { await Task.Run(() => uow.Repository().Delete(deviceInterface)); } }
public async Task <List <RegisteredDevice> > GetDevices( RomiApplicationHost host = null, RegisteredInterface deviceInterface = null) { if (host == null) { host = await this.GetLocalHost(); } List <RegisteredDevice> result = new List <RegisteredDevice>(); using (var uow = new UnitOfWork <RegisteredDevice, RomiDbContext>()) { var items = await uow.Repository().FindAsync( t => t.ApplicationHost == host && (deviceInterface == null || t.Interface == deviceInterface)); result.AddRange(items); } return(result); }
public async Task DeleteInterface([FromBody] RegisteredInterface deviceInterface) { throw new NotImplementedException(); }
public async Task <IActionResult> RegisterInterface([FromBody] RegisteredInterface deviceInterface) { throw new NotImplementedException(); }