public static async Task <Opportunity> DeleteOpportunity(this IOpportunityDataAccess dataAccess, string deleteId) { var opportunityToDelete = await dataAccess.FindOpportunityByDeleteId(deleteId); //just deactivate so we can still track or re-activate the opportunity opportunityToDelete.Active = false; opportunityToDelete.ManualDeletionDate = DateTime.Now; await dataAccess.UpsertOpportunity(opportunityToDelete); return(opportunityToDelete); }
public static async Task <Opportunity> ActivateOpportunity(this IOpportunityDataAccess dataAccess, string activationId) { var opportunityToActivate = await dataAccess.FindOpportunityByActivationId(activationId); opportunityToActivate.Active = true; var oneWeekFromNow = DateTime.Now.AddDays(7); opportunityToActivate.ExpirationDate = oneWeekFromNow; await dataAccess.UpsertOpportunity(opportunityToActivate); return(opportunityToActivate); }
public OpportunityModel( IConfiguration config, IOpportunityDataAccess opportunityDataAccess, IEmailService emailService, IGeocodingService geolocationService, ILogoStorage logoStorage ) { GoogleMapsApiKey = config["GoogleMapsApiKey"]; OpportunityDataAccess = opportunityDataAccess; EmailService = emailService; GeolocationService = geolocationService; LogoStorage = logoStorage; }
public ApplyModel(IConfiguration config, IOpportunityDataAccess opportunityDataAccess) { GoogleMapsApiKey = config["GoogleMapsApiKey"]; OpportunityDataAccess = opportunityDataAccess; }
public OpportunitiesController(IOpportunityDataAccess opportunityDataAccess) { OpportunityDataAccess = opportunityDataAccess; }