Posts

Showing posts from July, 2018

Pluralizing words in C#.Net

Today I wanted to create a dynamic title of a page according to name of category. Like "My Playlists", "My Libraries" etc. So there is a parameter of categoryID passing to page and I find category object accordingly. So there is a usage of .Net service: using System.Data.Entity.Design.PluralizationServices; .... Category category = Category.GetByID(categoryID); PluralizationService ps = PluralizationService.CreateService( new System.Globalization.CultureInfo( "en-GB" )); Page.Title = $"My { ps.Pluralize( category .Name) }" ; ..... Note : you need to add reference System.Data.Entity.Design to the project.

MongoDB Cloud Cluster Test

Today I performed initial basic test of  MongoDB Atlas  - it's MongoDB Cloud Cluster that can use different cloud providers. This process took me something like an hour to get my test system working. It's amaizing timing IMHO. And I'm happy to admit that I succesfully connect this cluster to .Net aplication using MongoDB Official driver - this part was not succeeded around an half a year ago in my previous company. Now I know the problem we faced there - it's incorrect connection string. Only incorrect connection string. And we failed. It's sad.... :-( P.S. As a client I used MongoDB Compass that is free and light but lack of major DBA features and UI. And I'm going to use something more powerfull, like Studio3T that I tried once and was very satisfied.