Ejemplo n.º 1
0
        public void SaveTemplate(FingerprintTemplate fingerPrintTemplate)
        {
            using (fpEntities db = new fpEntities()){
                enroll nuevo = new enroll();

                nuevo.quality  = fingerPrintTemplate.Quality;
                nuevo.template = fingerPrintTemplate.Buffer;

                db.enroll.Add(nuevo);

                db.SaveChanges();
            }
        }
Ejemplo n.º 2
0
        public List <FingerprintTemplateDTO> GetTemplates()
        {
            List <FingerprintTemplateDTO> lst;

            using (fpEntities db = new fpEntities()){
                lst = db.enroll.Select(
                    t => new FingerprintTemplateDTO
                {
                    Quality = (int)t.quality,
                    Buffer  = t.template,
                    ID      = t.ID
                }).ToList();
            }
            return(lst);
        }
Ejemplo n.º 3
0
        public FingerprintTemplateDTO GetTemplate(int idTemplate)
        {
            FingerprintTemplateDTO fpt;

            using (fpEntities db = new fpEntities())
            {
                fpt = db.enroll.Where(t => t.ID == idTemplate).Select(
                    t => new FingerprintTemplateDTO
                {
                    Quality = (int)t.quality,
                    Buffer  = t.template,
                    ID      = t.ID
                }).FirstOrDefault();
            }
            return(fpt);
        }