Пример #1
0
        public async Task <IHttpActionResult> Post(ScheduleSender ScheduleSender)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            db.ScheduleSenders.Add(ScheduleSender);
            await db.SaveChangesAsync();

            return(Created(ScheduleSender));
        }
        public async Task <IHttpActionResult> Post(EgreetingUser EgreetingUser)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            db.EgreetingUsers.Add(EgreetingUser);
            await db.SaveChangesAsync();

            return(Created(EgreetingUser));
        }