Example #1
0
        public async Task PutTechAsync(int id, Tech tech)
        {
            var techOrg = await _context.Teches.FindAsync(id);

            if (techOrg != null)
            {
                techOrg.Title = tech.Title;
                _context.Entry(techOrg).State = EntityState.Modified;
                await _context.SaveChangesAsync();
            }
        }
Example #2
0
 public async Task PostTechAsync(Tech tech)
 {
     _context.Teches.Add(tech);
     await _context.SaveChangesAsync();
 }
Example #3
0
 // 입력
 public void AddTech(Tech model) => this.db.Execute("Insert Into Teches (Title) Values (@Title)", model);
Example #4
0
 // 입력
 public void AddTech(Tech model)
 {
     string sql = "Insert Into Teches (Title) Values (@Title)";
     var    id  = this.db.Execute(sql, model);
 }