Beispiel #1
0
        //EDIT/PUT
        internal Job Edit(Job editJob)
        {
            Job original = GetById(editJob.Id);

            original.Title       = editJob.Title != null ? editJob.Title : original.Title;
            original.Description = editJob.Description != null ? editJob.Description : original.Description;
            original.Rate        = editJob.Rate != null ? editJob.Rate : original.Rate;

            return(_repo.Edit(original));
        }
        internal Job Edit(Job job)
        {
            Job original = Get(job.Id);

            original.Title       = job.Title != null ? job.Title : original.Title;
            original.Company     = job.Company != null ? job.Company : original.Company;
            original.Hours       = job.Hours != null ? job.Hours : original.Hours;
            original.Rate        = job.Rate != null ? job.Rate : original.Rate;
            original.Description = job.Description != null ? job.Description : original.Description;

            return(_repo.Edit(job));
        }