Ejemplo n.º 1
0
        public UsersExperienceViewModel GetExperienceByID(int ExperienceID)
        {
            UsersExperienceViewModel experience = new UsersExperienceViewModel();

            try
            {
                experience = _context.usp_UsersExperience_GetByID(ExperienceID)
                             .Select(x => new UsersExperienceViewModel
                {
                    Id          = x.Id,
                    Company     = x.Company,
                    WorkTitle   = x.WorkTitle,
                    FromDate    = x.FromDate,
                    ToDate      = x.ToDate,
                    Comments    = x.Comments,
                    IsActive    = x.IsActive,
                    UserID      = x.UserID,
                    CreatedBy   = x.CreatedBy,
                    UpdatedBy   = x.UpdatedBy,
                    CreatedDate = x.CreatedDate,
                    UpdatedDate = x.UpdatedDate
                }).FirstOrDefault();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(experience);
        }