public ActionResult CreateActor(Models.Actor record)
        {
            DeltaXMapper <Models.Actor, Actor> mapobj = new DeltaXMapper <Models.Actor, Actor>();
            DeltaXRepository obj = new DeltaXRepository();

            obj.AddActor(mapobj.Translate(record));
            return(RedirectToAction("CreateMovie"));
        }
示例#2
0
        static void Main(string[] args)
        {
            DeltaXRepository obj = new DeltaXRepository();

            //DateTime dt = Convert.ToDateTime("09-21-1995").Date;
            // Console.WriteLine(dt);
            Console.WriteLine(obj.AddActor("Anurag King", "09-21-1995", "Popularly known as King", "M"));
        }
示例#3
0
        public JsonResult AjaxMethodAddActors(string name, string sex, string dob, string bio)
        {
            DeltaXRepository obj = new DeltaXRepository();

            try
            {
                if (obj.AddActor(name, sex, dob, bio))
                {
                    return(Json("Data is successfully added"));
                }
                else
                {
                    return(Json("Errror in adding Data"));
                }
            }
            catch
            {
                return(Json("Errror in adding Data"));
            }
        }