Refactor Sponsors Database and Classes

Scott on 12/11/2015 10:09 PM

Scott on 2/15/2016 5:35 PM


0 (hrs)


Please do 1317 before this task.

We need to refactor Sponsors of RDNation...

  1. Create a brand new project and place it in its own folder just like Common.Site.
  2. Commit the new project to the following Repository: https://bitbucket.org/rdnation/common.sponsors
  3. Add this project to RDN solution.
  4. This project is going to MIRROR Common.Site so you will copy the directory structure.
    1. New Folder Classes
      1. New Folder Sponsors
      2. Copy the code from RDN.Library.Classes.League.Sponsor and place it in this folder.
      3. Update the namespace.
      4. Rename the class from Sponsor to SponsorManager
      5. Add a new class called SponsorItem
        1. Take all the properties from SponsorManager and put into SponsorItem.
      6. Mark RDN.Library.Classes.League.Sponsor class as [Obsolete]
    2. Add a new folder called DataModels
      1. Copy the Context Folder from Common.Site to this new folder.
      2. Rename the SiteContext to SponsorContext.
        1. Update the namespace and remove the unused classes.
        2. Update the InheritDb class and namespace.
      3. Remove the ErrorContext and SiteConfigurationContext
      4. Add a new Folder to DataModels called Sponsor
        1. Copy the Class from RDN.Library.DataModels.League.Sponsorship to this new folder
        2. Update the namespace.
        3. Rename this table to CS_Sponsors
        4. Rename this Class to SponsorDb
        5. Remove the references League and Member...
        6. Add a new property called OwnerId as Guid as this will be the LeagueId
        7. Add a new property called AddedBy as Guid and this will be the MemberId
    3. Connect the updated SponsorManager to this class by refactoring the code.
    4. Update the SponsorContext with the new SponsorDb class.
    5. Mark the class RDN.Library.DataModels.League.Sponsorship as [Obsolete]
    6. Refactor ALL the code that points at RDN.Library.Classes.League.Sponsor and point it to the new SponsorManager


Skip Navigation Links

Scott Saturday, January 30, 2016 5:15 PM #

Do you know how to fix conflicts?

  1. Go to the Sponsorships branch on your local machine.
  2. Pull the DEV branch into your Sponsorships branch from the remote server.
  3. Fix conflicts there.
  4. Commit the sponsoships branch.
  5. Push Sponsorships branch up to the server 

Dharmesh Saturday, January 30, 2016 4:57 AM #

Hey Scott, I tried to merge conflicts. But I ddn't getting any conflicts. 


Scott Thursday, January 28, 2016 7:20 PM #

Can you fix the merge conflicts?  I would like to start bringing this code in to RDNation.



Scott Tuesday, January 19, 2016 4:08 AM #

Please review my comments.



Then push and update code based on them.

The Refactor looks REALLY good.  Good job!

Powered by BugNET 1.6.339.0