Ejemplo n.º 1
0
        public Studios ParsePatch(StudiosModel model, int id)
        {
            try
            {
                Studios studio = this.movieRepository.GetSingleStudio(id);

                if (model.StudioName != null)
                {
                    studio.StudioName = model.StudioName;
                }

                studio.DateModified = DateTime.Now;

                return(studio);
            }
            catch
            {
                return(null);
            }
        }
Ejemplo n.º 2
0
        public Studios Parse(StudiosModel model)
        {
            try
            {
                var studio = new Studios();

                if (model.StudioName == null)
                {
                    return(null);
                }

                studio.StudioName   = model.StudioName;
                studio.DateAdded    = DateTime.Now;
                studio.DateModified = DateTime.Now;

                return(studio);
            }
            catch
            {
                return(null);
            }
        }