Exemplo n.º 1
0
        public bool CreateEmotional(EmotionalCreate model)
        {
            var entity =
                new Emotional()
            {
                OwnerId      = _userId,
                CategoryType = model.CategoryType,
                Title        = model.Title,
                ResourceType = model.ResourceType,
                Description  = model.Description,
                City         = model.City,
                State        = model.State,
                InPerson     = model.InPerson,
                Url          = model.Url,
                CreatedUtc   = DateTimeOffset.Now
            };

            using (var ctx = new ApplicationDbContext())
            {
                ctx.Emotionals.Add(entity);
                return(ctx.SaveChanges() == 1);
            }
        }
Exemplo n.º 2
0
        //EMOTIONAL

        public void InsertEmotional(Emotional Emotional)
        {
            _connection.Insert(Emotional);
        }
Exemplo n.º 3
0
 public EmotionalAddViewModel(Patient Patient)
 {
     this.Patient        = Patient;
     this.Emotional      = new Emotional();
     AddEmotionalCommand = new Command(ExecuteAddEmotionalCommand);
 }