public async Task <IndustrySkillsCreateModel> UpdateIndustrySkill(IndustrySkillsCreateModel model)
        {
            try
            {
                tblIndustrySkill data = await Task.Run(() => ManageIndustry_Skills.UpdateIndustrySkill(model.ConvertTotblIndustrySkill()));

                return(data.ConvertToIndustrySkill());
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #2
0
        public async Task <IHttpActionResult> UpdateIndustrySkill(IndustrySkillsCreateModel model)
        {
            try
            {
                userId = User.Identity.GetUserId();
                Helpers.Helpers.AddBaseProperties(model, "update", userId);

                return(Ok(await IndustryService.UpdateIndustrySkill(model)));
            }
            catch (Exception)
            {
                throw;
            }
        }
 public static tblIndustrySkill ConvertTotblIndustrySkill(this IndustrySkillsCreateModel data)
 {
     return(new tblIndustrySkill()
     {
         ID = Convert.ToInt64(data.id),
         IndustryID = data.industryId,
         Name = data.skillName,
         IsActive = data.isActive,
         IsDeleted = data.isDeleted ?? false,
         CreatedUserID = data.createdUserID,
         UpdatedUserID = data.updatedUserID,
         CreatedTimestamp = data.createdTimestamp ?? DateTime.Now,
         UpdatedTimestamp = data.updatedTimestamp ?? DateTime.Now
     });
 }
        public async Task <IndustrySkillsCreateModel> GetIndustrySkill(long Id)
        {
            try
            {
                IndustrySkillsCreateModel model = null;
                tblIndustrySkill          data  = await Task.Run(() => ManageIndustry_Skills.GetIndustrySkill(Id));

                model = data.ConvertToIndustrySkill();

                return(model);
            }
            catch (Exception)
            {
                throw;
            }
        }