Ejemplo n.º 1
0
        public async Task <Ingredient> Add(Ingredient instance)
        {
            if (instance != null)
            {
                await _context.Ingredients.AddAsync(instance);

                await _context.SaveChangesAsync();

                return(instance);
            }

            return(null);
        }
Ejemplo n.º 2
0
        public async Task <User_Follows> Add(User_Follows instance)
        {
            if (instance != null)
            {
                await _context.User_Follows.AddAsync(instance);

                await _context.SaveChangesAsync();

                return(instance);
            }

            return(null);
        }
Ejemplo n.º 3
0
        public async Task <Post> Add(Post instance)
        {
            if (instance != null)
            {
                await _context.Posts.AddAsync(instance);

                await _context.SaveChangesAsync();

                return(instance);
            }

            return(null);
        }
Ejemplo n.º 4
0
        public async Task <Notification> Add(Notification instance)
        {
            if (instance != null)
            {
                await _context.Notifications.AddAsync(instance);

                await _context.SaveChangesAsync();

                return(instance);
            }

            return(null);
        }