示例#1
0
        public async Task CreateInquiryAsync(Entities.Inquiry inquiry)
        {
            this._context.Entry(inquiry).State = EntityState.Added;
            this._context.Inquiry.Add(inquiry);
            await this._context.SaveChangesAsync();

            return;
        }
示例#2
0
        public async Task UpdateInquiryAsync(Entities.Inquiry inquiry)
        {
            this._context.Entry(inquiry).State                = EntityState.Modified;
            this._context.Entry(inquiry.System).State         = EntityState.Unchanged;
            this._context.Entry(inquiry.ContactMethod).State  = EntityState.Unchanged;
            this._context.Entry(inquiry.Classification).State = EntityState.Unchanged;
            this._context.Entry(inquiry.User).State           = EntityState.Unchanged;
            this._context.Entry(inquiry.GuestType).State      = EntityState.Unchanged;

            this._context.Update(inquiry);
            await this._context.SaveChangesAsync();

            return;
        }