Пример #1
0
        public Task <Result> Update(FootballTeam rootAggregate)
        {
            var vtr = RootAggregateRepositoryFootballTeamStategy.Update(db, rootAggregate);

            //db.ChangeTracker.Clear(); //<-- DbContext is a singleton so dont want it having tracking info being just kept

            db.Entry(rootAggregate).State = Microsoft.EntityFrameworkCore.EntityState.Detached; //Previous was throwing an error when I wanted to attach and update
            return(vtr);
        }
 public Task <Result> Update(FootballTeam rootAggregate)
 {
     return(RootAggregateRepositoryFootballTeamStategy.Update(db, rootAggregate));
 }