2 using System.Collections.Generic;
4 using Microsoft.EntityFrameworkCore;
20 public virtual IEnumerable<ScientificInternship>
All()
22 return _context.ScientificInternships
23 .Include(b => b.UserProfilesScientificInternships)
24 .ThenInclude(b => b.UserProfile);
27 public virtual IEnumerable<ScientificInternship>
AllWhere(Func<ScientificInternship, bool> predicate)
29 return All().Where(predicate);
34 return All().FirstOrDefault(u => u.Id ==
id);
39 return All().Where(predicate).FirstOrDefault();
44 _context.ScientificInternships.Add(item);
45 _context.SaveChanges();
52 _context.ScientificInternships.Update(item);
53 _context.SaveChanges();
59 var item = _context.ScientificInternships.Find(
id);
62 _context.ScientificInternships.Remove(item);
63 _context.SaveChanges();
67 public virtual IQueryable<ScientificInternship>
GetQuery()
69 return _context.ScientificInternships;
virtual IEnumerable< ScientificInternship > All()
virtual void Update(ScientificInternship item)
ScientificInternshipRepository(ScientificReportDbContext context)
virtual IEnumerable< ScientificInternship > AllWhere(Func< ScientificInternship, bool > predicate)
virtual ScientificInternship Get(Func< ScientificInternship, bool > predicate)
virtual void Create(ScientificInternship item)
virtual IQueryable< ScientificInternship > GetQuery()
virtual void Delete(Guid id)
virtual ScientificInternship Get(Guid id)