public void Update(GenreBL genre)
        {
            var item = AutoMapperBL <GenreBL, Genre> .Map(genre);

            Dbcontext.UowRepositoryGenres.Update(item);
            Dbcontext.Save();
        }
        public UserBL GetUser(int id)
        {
            if (0 >= id)
            {
                return(new UserBL());
            }

            return(AutoMapperBL <User, UserBL> .Map(Dbcontext.UowRepositoryUsers.Get(id)));
        }
        public RatingBL GetRating(int id)
        {
            if (0 >= id)
            {
                return(new RatingBL());
            }

            return(AutoMapperBL <Rating, RatingBL> .Map(Dbcontext.UowRepositoryRatings.Get, id));
        }
Beispiel #4
0
        public WorkBL GetWork(int id)
        {
            if (0 >= id)
            {
                return(new WorkBL());
            }

            return(AutoMapperBL <Work, WorkBL> .Map(Dbcontext.UowRepositoryWorks.Get(id)));
        }
        public GenreBL GetGenre(int id)
        {
            if (0 >= id)
            {
                return(new GenreBL());
            }

            return(AutoMapperBL <Genre, GenreBL> .Map(Dbcontext.UowRepositoryGenres.Get, id));
        }
Beispiel #6
0
        public CommentBL GetComment(int id)
        {
            if (0 >= id)
            {
                return(new CommentBL());
            }

            return(AutoMapperBL <Comment, CommentBL> .Map(Dbcontext.UowRepositoryComments.Get, id));
        }
        public void Update(RatingBL rating)
        {
            if (null == rating)
            {
                return;
            }

            var item = AutoMapperBL <RatingBL, Rating> .Map(rating);

            Dbcontext.UowRepositoryRatings.Update(item);
            Dbcontext.Save();
        }
Beispiel #8
0
        public void Update(WorkBL work)
        {
            if (null == work)
            {
                return;
            }

            var item = AutoMapperBL <WorkBL, Work> .Map(work);

            Dbcontext.UowRepositoryWorks.Update(item);
            Dbcontext.Save();
        }
Beispiel #9
0
        public void Update(CommentBL comment)
        {
            if (null == comment)
            {
                return;
            }

            var item = AutoMapperBL <CommentBL, Comment> .Map(comment);

            Dbcontext.UowRepositoryComments.Update(item);
            Dbcontext.Save();
        }
 public IEnumerable <UserBL> GetUsers()
 {
     return(AutoMapperBL <IEnumerable <User>, List <UserBL> > .Map(Dbcontext.UowRepositoryUsers.GetAll));
 }
 public IEnumerable <RatingBL> GetRatings()
 {
     return(AutoMapperBL <IEnumerable <Rating>, List <RatingBL> > .Map(Dbcontext.UowRepositoryRatings.GetAll));
 }
 public IEnumerable <GenreBL> GetGenres()
 {
     return(AutoMapperBL <IEnumerable <Genre>, List <GenreBL> > .Map(Dbcontext.UowRepositoryGenres.GetAll));
 }
Beispiel #13
0
 public IEnumerable <WorkBL> GetWorks()
 {
     return(AutoMapperBL <IEnumerable <Work>, List <WorkBL> > .Map(Dbcontext.UowRepositoryWorks.GetAll));
 }
Beispiel #14
0
 public IEnumerable <CommentBL> GetComments()
 {
     return(AutoMapperBL <IEnumerable <Comment>, List <CommentBL> > .Map(Dbcontext.UowRepositoryComments.GetAll()));
 }