public static Basic_Resource ToDatabase(Basic_Resource_Info info) { Basic_Resource resource = new Basic_Resource(); resource.Id = info.Id; resource.User = info.User; resource.Movie = info.Movie; resource.Title = info.Title; resource.Content = info.Content; resource.Type = info.Type; resource.Size = info.Size; resource.State = info.State; resource.Note = info.Note; resource.Time = info.Time; return(resource); }
public static Basic_Resource_Info ToModel(Basic_Resource resource) { Basic_Resource_Info info = new Basic_Resource_Info(); info.Id = resource.Id; info.User = (Guid)resource.User; info.Movie = (Guid)resource.Movie; info.Title = resource.Title; info.Content = resource.Content; info.Type = resource.Type; info.Size = resource.Size; info.State = resource.State; info.Note = resource.Note; info.Time = (DateTime)resource.Time; return(info); }