Esempio n. 1
0
        /// <summary>
        ///  Add some data to the database
        /// </summary>
        /// <param name="context"></param>
        private void AddDbsData(DbsContext context)
        {
            for (int i = 1; i <= 10; i++)
            {
                var item = new Value
                {
                    Name        = "Value " + i,
                    Description = "Description " + i
                };

                context.Values.Add(item);
            }

            context.SaveChanges();
        }
 public PessoaRepository(DbsContext context)
     : base(context)
 {
     _context = (_context ?? context);
 }
Esempio n. 3
0
 public ValuesController(DbsContext context)
 {
     _context = context;
 }