Choosing Dapper over EFCore

Recently I've been introduced the wonder that is Dapper, now understand most of my experience has been with Entity Framework and honestly found it hard to walk away from a framework that I love and been using since the beginning of my career. However for my current role I need to be more team oriented so its whatever gets the job done. This article will serve as a timestamp so that I can look back. So far its been four months using it and I do find myself using Dapper like EF but with more freedom. I have left concern about what I'm mapping to but just that I've mapped correct. Which I look at first in sql for the correct column. I've written more sql compared to what I wrote with EF. I think that says a lot about Dapper but its hard to say since I've also become more comfortable using sql. Overral Dapper is a lot easier to use. Notes Raw Queries in EF

Custom Logging with Personal Fields in Nlog

Setting the database string via var databaseTarget = ( DatabaseTarget ) LogManager . Configuration . FindTargetByName ( "database" ); databaseTarget . ConnectionString = connectionString ; LogManager . ReconfigExistingLoggers (); The above didn't work but I used the example below where I set it via the the start of the program. var defaultConnection = Configuration.GetConnectionString("DefaultConnection"); NLog.GlobalDiagnosticsContext.Set("defaultConnection", defaultConnection); var logger = LogManager.LoadConfiguration("nlog.config").GetCurrentClassLogger(); Then you can use ${gdc:item=defaultConnection} in your nlog.config: <target xsi:type="Database" connectionString="${gdc:item=defaultConnection}" /> Rather than using GDC, which is for global static data and fails on concurrent logging, it is better to use  EventProperties-Layout-Renderer  that allows to pass custom  properties specific for th

Angular 8 Material - mat-slide-toggle is unknown!

Currently wrapping things up with the project: MyPatco and you can find the repo here for example. Under my angular5 repo which isn't really angular 5 anymore but infact angular 8. That tells you how long its been since I've actually been working on this project. Or it could say how quickly angular is updating. Either way I'm going through my notes and writing about all the bugs I faced as I do with all my projects. This was probably the easiest bug but one that I thought was very interesting. I would have thought the component would be in scope give the fact that its under the library material. However it needs to be imported explicitly. Which makes me wonder what other pieces or components need to be imported as well. I currently use a small set of features for mypatco, I do plan to add notifications. I have the features listed out either in my issues under mypatco and whatever extra libraries I use under the repo's wiki. To answer my question from earlier,  &qu

A Small Business's Expenses & Sustainability

    Back in 2018, I made the incredible life decision to purchase my shop. Since then I've been taking care of small maintenance problems that I was aware of around the time of my purchase. At the begin of 2019 I drove back and forth between Philly and my shop. Which meant keeping an eye on heat costs and a few roof leaks from afar. Now that I'm closer to my shop and I had a chance to take care of some of the things.   The first thing I did was look at the electrical system. To be more energy efficient I put the money down to upgrade to LED's.   Removing all ballasts helped, still I have a ton of plans to improve my efficient. For starters getting   off the grid which a neighbor currently is doing. Since electricity is my biggest expense at the moment its the first thing to be upgrade. Managing a web host company really only costs two things, electricity and internet. Luckily electricity isn't much but its where I can save the most . Leaky roof The sh

Installing Windows on Acer chromebook 15 cb3-532

Much of my notes are just small problems I faced (what's new!) haha. Either way this was a really fun project to do for a friend and I got excited once I research all the information. You can find instruction videos but what helped me the most was the coolstar website. Sadly they don't have parameters in the url so I can link the machine I used in this article. - Scared of messing with the bios? Don't be!    So you need to first remove the screw to put a legacy bios on the machine. Its easy to backup the chrome os one and with the same steps to change it. You can go back in and revert to the chrome version bios. Its that last part that had me worried and its very easy to do.  Problems getting into Developer Mode?   Follow the instructions to the letter, during the step to disable the OS verification, press Ctrl-D to boot into os. If you hear two beeps I would go back to set one. I got in a loop where it s Separate Product or ItemList Products?

This started to be a little be more of a challenge one night more then I thought. The issue was that I need to have position in my list of products. Which were in a ItemList when I used the itemtype in the same div I didn't have the option to add position ; a requirement for ItemListElement. This all came from about because I was simplifying my list of products by just displaying them on a single page with prices. I wanted to put them list however looking back after a long night I could have easily just listed them as separate Product types. So to summarize the issue I wanted to meet all the requirements from Google's Structured Data Tool and didn't think listing them as multiple Products was right and instead did them as ItemList. Not to be confused with ListItem which is a type that can be at the root but also under ItemListElement. Its all very confusing at first glance. The next question I asked...  Is it okay to have more than one Product Example: (this doesn

Angular + Bootstrap 4 Navbar with Right Dropdown

From reading the document on bootstrap (version: 4.3.1)  and comparing my notes from version 3. There doesn't seem to be an example for a right dropdown with a navbar. Flexboxes can be a challenge and moving from bootstrap 3 isn't but here is some solutions. Examples - -  (icon on the right) - With Queryjs  I should probably put this in another article, still I'm killing two birds with one stone.

Popular posts from this blog

Installing Windows on Acer chromebook 15 cb3-532

Entity Framework: ToListAynsc & WhereAsync

CSharp Cheatsheet