public async Task <HealthInformations> GetHealthInformation(int healthID)
        {
            HealthInformations health = context.HealthInformations.SingleOrDefault(h => h.HealthInfoID.Equals(healthID));

            if (health != null)
            {
                return(health);
            }
            else
            {
                return(null);
            }
        }
        public async Task <HealthInformations> DeleteHealthInformation(int healthID)
        {
            HealthInformations health = context.HealthInformations.Where(h => h.HealthInfoID.Equals(healthID)).FirstOrDefault();

            if (health != null)
            {
                context.HealthInformations.Remove(health);
                context.SaveChanges();
                return(null);
            }
            else
            {
                return(null);
            }
        }
        public async Task <HealthInformations> PutHealthInformations(HealthInformations healthInformations)
        {
            HealthInformations model = context.HealthInformations.SingleOrDefault(h => h.HealthInfoID.Equals(healthInformations.HealthInfoID));

            if (model != null)
            {
                // model.HealthInfoID = healthInformations.HealthInfoID;
                model.Header          = healthInformations.Header;
                model.HeathContent    = healthInformations.HeathContent;
                model.HealthImage     = healthInformations.HealthImage;
                model.HeathReferences = healthInformations.HeathReferences;
                model.InfoLock        = healthInformations.InfoLock;
                context.SaveChanges();
                return(healthInformations);
            }
            else
            {
                return(null);
            }
        }
 public async Task <HealthInformations> PutHealthInformations(HealthInformations healthInformations)
 {
     return(await iheath.PutHealthInformations(healthInformations));
 }
 public async Task <HealthInformations> PostHealthInformations(HealthInformations healthInformations)
 {
     context.HealthInformations.Add(healthInformations);
     context.SaveChanges();
     return(healthInformations);
 }
예제 #6
0
 public void ReportDeployedServicePackageHealth(HealthInformation healthInformation, HealthReportSendOptions sendOptions)
 {
     HealthInformations?.Add(healthInformation);
 }
예제 #7
0
 public void ReportDeployedApplicationHealth(HealthInformation healthInformation, HealthReportSendOptions sendOptions)
 {
     HealthInformations?.Add(healthInformation);
 }
예제 #8
0
 public void ReportDeployedServicePackageHealth(HealthInformation healthInformation)
 {
     HealthInformations?.Add(healthInformation);
 }
예제 #9
0
 public void ReportDeployedApplicationHealth(HealthInformation healthInformation)
 {
     HealthInformations?.Add(healthInformation);
 }