static void Main(string[] args)
        {
            var db = new myEntities();

            var test = db.ticket.Select(t => t.change_time.YearWeek(3).Insert(5, 0, "/"));

            var test2 = test.ToList();

            Console.Read();
        }
Esempio n. 2
0
        // GET: odata/MarvelCharacters
        public IHttpActionResult GetMarvelCharactersV4(ODataQueryOptions <MarvelCharacter> queryOptions)
        {
            // validate the query.
            try
            {
                queryOptions.Validate(_validationSettings);
            }
            catch (ODataException ex)
            {
                return(BadRequest(ex.Message));
            }

            var entities         = new myEntities();
            var marvelCharacters = (from c in entities.MarvelCharacters select c).ToList();

            return(Ok <IEnumerable <MarvelCharacter> >(marvelCharacters));
        }