public override Task <Empty> DeleteApplicantSkill(AppSkillArray request, ServerCallContext context)
        {
            var pocos = ProtoToPoco(request);

            _logic.Delete(pocos.ToArray());
            return(new Task <Empty>(() => new Empty()));
        }
        public List <ApplicantSkillPoco> ProtoToPoco(AppSkillArray request)
        {
            List <ApplicantSkillPoco> pocos = new List <ApplicantSkillPoco>();
            var inputList = request.AppSkill.ToList();

            foreach (var item in inputList)
            {
                ApplicantSkillPoco poco = new ApplicantSkillPoco();
                poco.Id         = Guid.Parse(item.Id);
                poco.Applicant  = Guid.Parse(item.Applicant);
                poco.Skill      = item.Skill;
                poco.SkillLevel = item.SkillLevel;
                poco.StartMonth = Convert.ToByte(item.StartMonth);
                poco.StartYear  = item.StartYear;
                poco.EndMonth   = Convert.ToByte(item.EndMonth);
                poco.EndYear    = item.EndYear;
                pocos.Add(poco);
            }
            return(pocos);
        }
        public override Task <AppSkillArray> GetAllApplicantSkill(Empty request, ServerCallContext context)
        {
            List <AppSkillProto>      appSkillList = new List <AppSkillProto>();
            List <ApplicantSkillPoco> pocos        = _logic.GetAll();

            foreach (var poco in pocos)
            {
                AppSkillProto appSkill = new AppSkillProto();
                appSkill.Id         = poco.Id.ToString();
                appSkill.Applicant  = poco.Applicant.ToString();
                appSkill.Skill      = poco.Skill;
                appSkill.SkillLevel = poco.SkillLevel;
                appSkill.StartMonth = Convert.ToInt32(poco.StartMonth);
                appSkill.StartYear  = poco.StartYear;
                appSkill.EndMonth   = Convert.ToInt32(poco.EndMonth);
                appSkill.EndYear    = poco.EndYear;
                appSkillList.Add(appSkill);
            }
            AppSkillArray appSkillArray = new AppSkillArray();

            appSkillArray.AppSkill.AddRange(appSkillList);
            return(new Task <AppSkillArray>(() => appSkillArray));
        }