예제 #1
0
파일: XeController.cs 프로젝트: anhttse/VMT
 public Xe Get(int id)
 {
     using (var db = new VMTContext())
     {
         return(db.Xe.Find(id));
     }
 }
예제 #2
0
파일: XeController.cs 프로젝트: anhttse/VMT
 public IEnumerable <Xe> Get(string qr)
 {
     using (var db = new VMTContext())
     {
         return(db.Xe.Where(x => x.BienSoXe.Contains(qr)).AsEnumerable());
     }
 }
예제 #3
0
파일: XeController.cs 프로젝트: anhttse/VMT
 public string Post([FromBody] Xe xe)
 {
     using (var db = new VMTContext())
     {
         db.Xe.Add(xe);
         var rs = db.SaveChanges();
         return(rs > 0 ? "status:1" : "status:0");
     }
 }
예제 #4
0
 public HangHoaRepository(VMTContext context)
 {
     _db = context;
 }
예제 #5
0
 public XeRepository(VMTContext context)
 {
     _db = context;
 }
예제 #6
0
 public VanChuyenRepository(VMTContext context)
 {
     _db = context;
 }