Ejemplo n.º 1
0
 public async Task DeleteInterface(RegisteredInterface deviceInterface)
 {
     using (var uow = new UnitOfWork <RegisteredInterface, RomiDbContext>())
     {
         await Task.Run(() => uow.Repository().Delete(deviceInterface));
     }
 }
Ejemplo n.º 2
0
        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();
 }