Exemple #1
0
        public async Task CreateAsync(PostModel postModel)
        {
            postModel.CreatedAt = DateTime.Now;
            postModel.UpdatedAt = DateTime.Now;

            _laSocialContext.Posts.Add(postModel);
            await _laSocialContext.SaveChangesAsync();
        }
Exemple #2
0
        public async Task SignupAsync(UserModel userModel)
        {
            userModel.CreatedAt = DateTime.Now;
            userModel.UpdatedAt = DateTime.Now;

            _laSocialContext.Users.Add(userModel);
            await _laSocialContext.SaveChangesAsync();
        }