示例#1
0
 public IActionResult Post([FromBody] Division division)
 {
     if (division == null)
     {
         return(BadRequest());
     }
     division.DateTime = DateTime.Now;
     db.Add(division);
     db.SaveChanges();
     return(Ok(division));
 }
示例#2
0
 public IActionResult Post([FromBody] Realtor realtor)
 {
     if (realtor == null)
     {
         return(BadRequest());
     }
     realtor.DateTime = DateTime.Now;
     db.Add(realtor);
     db.SaveChanges();
     return(Ok(realtor));
 }