Exemplo n.º 1
0
 public RouteKKTModel(TblRouteKKT row)
 {
     Id     = row.Id;
     Name   = row.Name;
     Points = row.Points;
     Time   = row.Time;
     CompId = row.CompetitionId;
     Type   = row.Type;
 }
Exemplo n.º 2
0
        public HttpResponseMessage Put(int routeId, [FromBody] TblRouteKKT value)
        {
            /* if (CompetitionDB.TblRoutesKKT.FirstOrDefault(x => x.Id == routeId) != null)
             * {*/
            CompetitionDB.Entry(value).State = EntityState.Modified;

            return(ToJsonOK(CompetitionDB.SaveChanges()));

            /* }
             *
             * return ToJsonNotFound("Objektas nerastas.");*/
        }
Exemplo n.º 3
0
        public HttpResponseMessage Post([FromBody] TblRouteKKT value)
        {
            CompetitionDB.TblRoutesKKT.Add(value);

            return(ToJsonCreated(CompetitionDB.SaveChanges()));
        }