5

Side-effects On its own, this: private MySqlConnection _myDBString; public IDbConnection GetMyDBConnection { get { _myDBString = new MySqlConnection(epaperconnectionString); return _myDBString; } } is a deeply bad idea. Getters should usually be trusted to have no side-effects that mutate the class. The only exception to this I ...


4

Some quick remarks: epaperconnectionString doesn't follow the proper naming conventions for compound words. Also: why wouldn't you store all your configuration settings in a dedicated class? (I'm not a fan of seeing ConfigurationManager all over the place: if you ever need to change a setting's name you need to look in multiple places, whereas it would be a ...


3

I always go with the version that would be a best fit to the project. This means, you need to consider the overall project coding syntax, and how much code in the client side, to know where to focus more. Some projects focuses on server side more than using the client side handling, so in this case using the server side would be better to keep the code in ...


1

it seems DisplayLink() , DisplayGroupLink() have a bad naming, which made you store them in a variable with a better naming. if you're working on old code that has not followed good practices, I would suggest you avoid using it directly, and instead, implement a new class that would follow good practices, and use it instead. Then, you can then mark old code ...


1

Method has multiple mix responsibilities, it should have one responsibility and clearer scope. variable naming doesn't follow naming convention (e.g. id , fm, str) you should always pick a clearer names for your variables. when parsing or converting types, you should always validate them or use the appropriate conversions methods such as int.TryParse. always ...


1

Quick remarks: Don't do this: public RequestService() { _hostWebApiUrl = Config.AppSettings["TestWebApiURL"]; _apiAuthKey = Config.AppSettings["ApiKey"]; } public RequestService(string hostWebApiUrl, string apiAuthKey) { _hostWebApiUrl = hostWebApiUrl; _apiAuthKey = apiAuthKey; } Instead pass the values you ...


Only top voted, non community-wiki answers of a minimum length are eligible