Ejemplo n.º 1
0
        // UPDATE
        public bool UpdateTitle(Title title)
        {
            TitleLogic logic   = new TitleLogic();
            bool       success = logic.UpdateTitle(title);

            log.Info($"UpdateTitle: {title.TitleId}, {(success ? "success" : "fail")}");
            return(success);
        }
Ejemplo n.º 2
0
        // DELETE
        public bool DeleteTitle(string id)
        {
            TitleLogic logic   = new TitleLogic();
            bool       success = logic.DeleteTitle(id);

            log.Info($"DeleteTitle: {id}, {(success ? "success" : "fail")}");
            return(success);
        }
Ejemplo n.º 3
0
        public int GetTitleCountByTitle(string titleName)
        {
            TitleLogic logic = new TitleLogic();
            int        count = logic.GetTitleCountByTitle(titleName);

            log.Info($"GetTitleCountByTitle: {titleName}, {(count > -1 ? "success" : "failure")}");
            return(count);
        }
Ejemplo n.º 4
0
        public IEnumerable <Title> GetTitleRangeByTitle(string titleName, int startIndex, int count)
        {
            TitleLogic          logic  = new TitleLogic();
            IEnumerable <Title> titles = logic.GetTitleRangeByTitle(titleName, startIndex, count);

            log.Info($"GetTitleRangeByTitle: {titleName}, {startIndex}, {count}, {(titles != null ? "success" : "failure")}");
            return(titles);
        }
Ejemplo n.º 5
0
        public IEnumerable <Title> GetTitlesByTitle(string titleName)
        {
            TitleLogic          logic  = new TitleLogic();
            IEnumerable <Title> titles = logic.GetTitlesByTitle(titleName);

            log.Info($"GetTitlesByTitle: {titleName}, {(titles != null ? "success" : "failure")}");
            return(titles);
        }
Ejemplo n.º 6
0
        // READ
        public Title GetTitleById(string id)
        {
            TitleLogic logic = new TitleLogic();
            Title      title = logic.GetTitleById(id);

            log.Info($"GetTitleById: {id}, {(title != null ? "success" : "failure")}");
            return(title);
        }
Ejemplo n.º 7
0
 public TitlesController()
 {
     _logic = new TitleLogic();
 }