public IResult AddRange(List <Skill> skills)
        {
            skills.ForEach(s => s.Id = 0);
            int memberId       = skills.FirstOrDefault().MemberId;
            var skillsToDelete = _skillDal.GetList(x => x.MemberId == memberId).ToList();

            _skillDal.RemoveRange(skillsToDelete);
            _skillDal.AddRange(skills.Distinct().ToList());
            return(new SuccessResult(Messages.SkillsAdded));
        }
Ejemplo n.º 2
0
 public IList <Skill> GetList()
 {
     return(_skillDal.GetList());
 }