コード例 #1
0
        public async Task AddAsync(IFeatureInfo info)
        {
            var context = _contextStorage.Get();

            context.Features.Add(new FeatureEntity(info));
            await context.SaveChangesAsync();
        }
コード例 #2
0
        public async Task AddAsync(int userId, IProjectInfo info)
        {
            var context = _contextStorage.Get();

            context.Projects.Add(new ProjectEntity(userId, info));
            await context.SaveChangesAsync();
        }
コード例 #3
0
        public async Task AddAsync(ITaskInfo task)
        {
            var context = _contextStorage.Get();

            context.Tasks.Add(new TaskEntity(task));
            await context.SaveChangesAsync();
        }
コード例 #4
0
        private SessionsContainer GetSessionsContainer()
        {
            IContextStorage <SessionsContainer> storage = this.GetContextStorage();
            SessionsContainer container = storage.Get();

            if (container == null)
            {
                container = new SessionsContainer();
                storage.Store(container);
            }

            return(container);
        }
コード例 #5
0
        public Task AddAsync(IUserInfo user)
        {
            var context = _contextStorage.Get();

            context.Users.Add(new UserEntity(user));

            return(context.SaveChangesAsync());
        }
コード例 #6
0
 protected override Task SaveChangesAsync()
 {
     return(_contextStorage.Get().SaveChangesAsync());
 }