public async Task <GeneralCategory> Update(UpdateCategory updatedRegistry)
        {
            using (InventoryDB db = new InventoryDB())
            {
                Category categoryToUpdate = await db.Categories.FindAsync(updatedRegistry.Id);

                updatedRegistry.Update(categoryToUpdate);
                await db.SaveChangesAsync();

                return(categoryToUpdate.toDTO());
            }
        }