コード例 #1
0
        public int Inserir(HistoricoTColetorVO tcoletorvo)
        {
            var banco = new SINAF_WebEntities();

            var query = new HistoricoTColetor
            {
                NumeroColetor = tcoletorvo.NumeroColetor,

                DataUltimoSincronismo = DateTime.Now,

                NumeroTotalSincronismo = 0,

                NumeroTotalEntrevista = 0,
            };

            banco.AddToHistoricoTColetor(query);
            banco.SaveChanges();

            tcoletorvo.IDHistoricoColetor = query.IDHistoricoColetor;

            return(query.IDHistoricoColetor);
        }