How could I restore a Cosmos DB container if there is a periodic backup?

Advertisements Is there a way to restore a Cosmos DB container after I accidentally deleted it? I just confused the live environment with a local Cosmos DB emulator. When I go to the Settings – Backup & Restore it says: Your account is on periodic backup mode. You can now change to continuous mode for… Read More How could I restore a Cosmos DB container if there is a periodic backup?

How do I initialize an ILogger in a .NET 6 class library?

Advertisements I’ve a class library, which is used by a console application. I now want to add a ILogger<T> via constructor injection in my class library. I came up with something like this: public class Class1 { private readonly ILogger<Class1> _logger; public Class1(ILogger<Class1> logger) { _logger = logger; } } Nevertheless I don’t know how… Read More How do I initialize an ILogger in a .NET 6 class library?

Flutter, The element type 'List<ListTile>' can't be assigned to the list type 'Widget'

Advertisements I tried geting data from firebase and display it using streamBuilder but I get this error, how do I solve it. body: StreamBuilder<QuerySnapshot>( stream: firestore.collection(‘paymnet data’).snapshots(), builder: (context, snapshot) { return ListView( children: [ snapshot.data!.docs.map((DocumentSnapshot document){ Map<String,dynamic> data = document.data()! as Map<String, dynamic>; return ListTile( title: Text(data[‘amount’]), subtitle: Text(data[‘paid date’]), ); }).toList(); ], );… Read More Flutter, The element type 'List<ListTile>' can't be assigned to the list type 'Widget'

Uncaught (in promise) FirebaseError: No document to update

Advertisements I made a firestore database that looks like this. I’m trying to make "stocks : 999" value change, so that it can be 998, 997, etc… So I followed given instructions on firebase documentation (https://firebase.google.com/docs/firestore/manage-data/add-data#web-version-9_8), but I bump into an error when trying to make it work. const [stock, SetStock] = useState([]); const toUpdate… Read More Uncaught (in promise) FirebaseError: No document to update

how to add new data to existing map in firebase flutter

Advertisements here is the firebase document data I want to add a new map value to the purchased-id. this is the current code FirebaseFirestore.instance.collection(‘users’).doc(userID).set({ ‘purchased-id’: { widget.head: widget.id, } }); but with this code the map value is replaced, how do I add another map value to the existing map like this >Solution : I… Read More how to add new data to existing map in firebase flutter