Closed P9avel closed 2 years ago
Hello, i am have Grain public class UserGrain : Grain, IUser { private IPersistentState _userData;
public UserGrain([PersistentState("Users")] IPersistentState<UserData> userData) { this._userData = userData; } public async Task CreateUser(DateTime created) { _userData.State.Id = this.GetPrimaryKey(); _userData.State.Created = created; await _userData.WriteStateAsync(); } public Task GetCreatedDate() => Task.FromResult(_userData.State.Created); }
I am wait to have 'Users' collection in MongoDb. But i have 'GrainsUsers'. How to replace full collection name?
Just set the CollectionPrefix to an empty string.
Many tnx, works!
Hello, i am have Grain public class UserGrain : Grain, IUser { private IPersistentState _userData;
I am wait to have 'Users' collection in MongoDb. But i have 'GrainsUsers'. How to replace full collection name?